Mercurial > pylearn
comparison doc/v2_planning/API_coding_style.txt @ 1183:bc1b445e22fa
API_coding_style: Added code example to explain the point about the number of spaces after a period
author | Olivier Delalleau <delallea@iro> |
---|---|
date | Fri, 17 Sep 2010 16:51:09 -0400 |
parents | 9ebd40d31a1b |
children | 5783948b3f8c |
comparison
equal
deleted
inserted
replaced
1182:14aa0a5bb661 | 1183:bc1b445e22fa |
---|---|
40 | 40 |
41 However, there are a few points mentioned in those documents that we decided | 41 However, there are a few points mentioned in those documents that we decided |
42 to do differently: | 42 to do differently: |
43 | 43 |
44 * Use only one space (not two) after a sentence-ending period in comments. | 44 * Use only one space (not two) after a sentence-ending period in comments. |
45 | |
46 .. code-block:: python | |
47 | |
48 # Good. | |
49 # This is the first sentence. It is followed by a single blank space. | |
50 # Bad. | |
51 # This is the first sentence. It is followed by two blank spaces. | |
45 | 52 |
46 * You do not need to add an extra blank line before the closing quotes of | 53 * You do not need to add an extra blank line before the closing quotes of |
47 a multi-line docstring. Also, we ask that the first line of a multi-line | 54 a multi-line docstring. Also, we ask that the first line of a multi-line |
48 docstring should contain only the opening quotes. | 55 docstring should contain only the opening quotes. |
49 | 56 |