Michele Simionato wrote:
On Aug 17, 6:50 am, AK <andrei....@gmail.com> wrote:
On 08/17/2010 12:26 AM, James Mills wrote:
By the way, the reason I asked is that we're working on a python
tutorial and I realized that even though I'm used to 99, I wasn't sure
if it's ok to teach that to new users or not..

   -andrei

It is certainly NOT useful to teach a convention which is explicitly
discouraged in the Python guidelines (PEP 8). Having said that, I
particularly *hate* people using long lines, and I usually reindent
the code of my coworkers not following that convention.
The reason is that my Emacs is set to 79 chars and longer code looks
ugly, that I look at two-side diffs all the time, and that sometimes I
want to print on paper the code I have to work with. OTOH, I do not
see a single advantage in using long lines.

     Michele Simionato
Using long lines can sometimes improve readability, procude better shaped code, 'cause wrapping code to 79 chars may not be "natural" in all cases.

We do have a strong habit using meaningfull & plain names in our code, no i, j, k ; cmdLine is always replaced by commandLine. So lines can easily exceed 79 chars and wrapping it would'nt be easy. I'm not saying wrapping to 79 is wrong, I'm just saying that they are advantages of using long lines (the 1st obvious one being not to care about wrapping text).

Saying that, if one intend to distribute its code, he should stick to 80 chars per line.

JM
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to