|
4 | 4 | Style guide |
5 | 5 | =========== |
6 | 6 |
|
7 | | -.. highlight:: rest |
| 7 | +.. highlight:: rest |
8 | 8 |
|
9 | | -This document describes the style guide for our documentation. |
| 9 | +This page describes the linguistic style guide for our documentation. |
| 10 | +For markup details in reST files, see :ref:`markup`. |
10 | 11 |
|
11 | 12 |
|
12 | | -Use of whitespace |
13 | | -================= |
14 | | - |
15 | | -All reST files use an indentation of 3 spaces; no tabs are allowed. The |
16 | | -maximum line length is 80 characters for normal text, but tables, deeply |
17 | | -indented code samples and long links may extend beyond that. Code example |
18 | | -bodies should use normal Python 4-space indentation. |
19 | | - |
20 | | -Make generous use of blank lines where applicable; they help group things |
21 | | -together. |
22 | | - |
23 | | -A sentence-ending period may be followed by one or two spaces; while reST |
24 | | -ignores the second space, it is customarily put in by some users, for example |
25 | | -to aid Emacs' auto-fill mode. |
26 | | - |
27 | 13 | Footnotes |
28 | 14 | ========= |
29 | 15 |
|
@@ -264,20 +250,3 @@ errors ("I made a mistake, therefore the docs must be wrong ..."). Typically, |
264 | 250 | the documentation wasn't consulted until after the error was made. It is |
265 | 251 | unfortunate, but typically no documentation edit would have saved the user from |
266 | 252 | making false assumptions about the language ("I was surprised by ..."). |
267 | | - |
268 | | -Big *O* notation |
269 | | -================ |
270 | | - |
271 | | -Big *O* notation is used to describe the performance of algorithms. |
272 | | - |
273 | | -Use italics for the big *O* and variables. For example: |
274 | | - |
275 | | -======================== ==================== |
276 | | -reStructuredText Rendered |
277 | | -======================== ==================== |
278 | | -``*O*\ (1)`` *O*\ (1) |
279 | | -``*O*\ (log *n*)`` *O*\ (log *n*) |
280 | | -``*O*\ (*n*)`` *O*\ (*n*) |
281 | | -``*O*\ (*n* log *n*)`` *O*\ (*n* log *n*) |
282 | | -``*O*\ (*n*\ :sup:`2`)`` *O*\ (*n*\ :sup:`2`) |
283 | | -======================== ==================== |
0 commit comments