Mercurial > pylearn
diff doc/v2_planning/coding_style.txt @ 1063:074901ccf7b6
Some additional notes on some of the tasks and points from the meeting.
author | wardefar@grincheux.iro.umontreal.ca |
---|---|
date | Thu, 09 Sep 2010 15:57:48 -0400 |
parents | 64720cdca3d3 |
children | 4f287324a5ad |
line wrap: on
line diff
--- a/doc/v2_planning/coding_style.txt Thu Sep 09 13:21:20 2010 -0400 +++ b/doc/v2_planning/coding_style.txt Thu Sep 09 15:57:48 2010 -0400 @@ -25,6 +25,7 @@ * http://eikke.com/how-not-to-write-python-code/ * http://jaynes.colorado.edu/PythonGuidelines.html * http://docs.djangoproject.com/en/dev/internals/contributing/#coding-style + * http://projects.scipy.org/numpy/wiki/CodingStyleGuidelines We will probably want to take PEP-8 as starting point, and read what other people think about it / how other coding guidelines differ from it. @@ -48,6 +49,10 @@ * You should use two spaces after a sentence-ending period. --> Looks weird to me. + (DWF: This is an old convention from the typewriter era. It has more + or less been wiped out by HTML's convention of ignoring extra + whitespace: see http://en.wikipedia.org/wiki/Sentence_spacing for + more detail. I think it's okay to drop this convention in source code.) * Imports should usually be on separate lines --> Can be a lot of lines wasted for no obvious benefit. I think this is @@ -123,6 +128,11 @@ Support 2.4 (because some of the clusters are still running 2.4) and write code that can be converted to 3.x with 2to3 in a straightforward way. Task: Write to-do's and to-not-do's to avoid compatibility issues. (OD) +(DWF: Pauli Virtanen and others have put together extensive +documentation in the process of porting NumPy to Py3K, see his notes at +http://projects.scipy.org/numpy/browser/trunk/doc/Py3K.txt -- this is +the most complete resource for complicated combinations of Python and C). + * C coding style How to write C code (in particular for Numpy / Cuda), and how to mix C and @@ -151,4 +161,4 @@ * VIM / Emacs plugins / config files To enforce good coding style automatically. Task: Look for existing options. (FB) - +(DWF: I have put some time into this for vim, I will send around my files)