Mercurial > pylearn
comparison doc/v2_planning/coding_style.txt @ 1074:ee7f34fc98fe
Merged
author | Olivier Delalleau <delallea@iro> |
---|---|
date | Fri, 10 Sep 2010 11:38:40 -0400 |
parents | 3e7978201ffc 04bbf05d249c |
children | d422f726c156 |
comparison
equal
deleted
inserted
replaced
1073:3e7978201ffc | 1074:ee7f34fc98fe |
---|---|
6 - Dumitru | 6 - Dumitru |
7 - Fred | 7 - Fred |
8 - David | 8 - David |
9 - Olivier D [leader] | 9 - Olivier D [leader] |
10 | 10 |
11 | |
12 | |
13 Fred: This is a refactored thing from James email of what we should put in message | |
14 that we send to the user: | |
15 1) Hint where in the code this log come from. | |
16 2) Hint how to hide this message? or we should this into documentation. | |
17 3) Tell explicitly if the user can ignore it and the consequence. | |
18 | |
11 Existing Python coding style specifications and guidelines | 19 Existing Python coding style specifications and guidelines |
12 ---------------------------------------------------------- | 20 ---------------------------------------------------------- |
13 | 21 |
14 * http://www.python.org/dev/peps/pep-0008/ | 22 * http://www.python.org/dev/peps/pep-0008/ Style Guide for Python Code |
15 * http://www.python.org/dev/peps/pep-0257/ | 23 * http://www.python.org/dev/peps/pep-0257/ Docstring Conventions |
16 * http://google-styleguide.googlecode.com/svn/trunk/pyguide.html | 24 * http://google-styleguide.googlecode.com/svn/trunk/pyguide.html Google Python Style Guide |
17 * http://www.voidspace.org.uk/python/articles/python_style_guide.shtml | 25 * http://www.voidspace.org.uk/python/articles/python_style_guide.shtml |
18 * http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html | 26 * http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html |
19 * http://www.cs.caltech.edu/courses/cs11/material/python/misc/python_style_guide.html | 27 * http://www.cs.caltech.edu/courses/cs11/material/python/misc/python_style_guide.html |
20 * http://barry.warsaw.us/software/STYLEGUIDE.txt | 28 * http://barry.warsaw.us/software/STYLEGUIDE.txt |
21 * http://self.maluke.com/style | 29 * http://self.maluke.com/style |
85 or | 93 or |
86 x = my_func( | 94 x = my_func( |
87 a, b, c, d, e, f) | 95 a, b, c, d, e, f) |
88 --> Probably depends on the specific situation, but we could have a | 96 --> Probably depends on the specific situation, but we could have a |
89 few typical examples (and the same happens with multi-lines lists) | 97 few typical examples (and the same happens with multi-lines lists) |
98 (Fred: I would do 2 or 3, but not 1. I find it more redable when the | |
99 indent is broken after a paranthesis then at any point. | |
90 | 100 |
91 * From PEP 257: The BDFL [3] recommends inserting a blank line between the | 101 * From PEP 257: The BDFL [3] recommends inserting a blank line between the |
92 last paragraph in a multi-line docstring and its closing quotes, placing | 102 last paragraph in a multi-line docstring and its closing quotes, placing |
93 the closing quotes on a line by themselves. This way, Emacs' | 103 the closing quotes on a line by themselves. This way, Emacs' |
94 fill-paragraph command can be used on it. | 104 fill-paragraph command can be used on it. |
120 Task: Highlight the most important points in them (OD). | 130 Task: Highlight the most important points in them (OD). |
121 | 131 |
122 * Documentation | 132 * Documentation |
123 Use RST with Sphinx. | 133 Use RST with Sphinx. |
124 Task: Provide specific examples on how to document a class, method, and some | 134 Task: Provide specific examples on how to document a class, method, and some |
125 specific classes like Op (DE). | 135 specific classes like Op (DE). Modify the theano documentation to include that. |
126 | 136 |
127 * Python versions to be supported | 137 * Python versions to be supported |
128 Support 2.4 (because some of the clusters are still running 2.4) and write | 138 Support 2.4 (because some of the clusters are still running 2.4) and write |
129 code that can be converted to 3.x with 2to3 in a straightforward way. | 139 code that can be converted to 3.x with 2to3 in a straightforward way. |
130 Task: Write to-do's and to-not-do's to avoid compatibility issues. (OD) | 140 Task: Write to-do's and to-not-do's to avoid compatibility issues. (OD) |