Fun python 3.2 one-liner

Daniel Fetchinson fetchinson at googlemail.com
Tue Apr 5 13:54:13 EDT 2011


>>>> what is the character limit on a one liner :P.
>>>
>>> For PEP 8 compliance, 80 characters. :-)
>>
>> Yeah, but we don't live in the 80's or 90's anymore and our screens can
>> support xterms (or let alone IDE widows) much wider than 80 characters.
>> I'm using 140 for python these days. Seriously, who would want to limit
>> him/herself to 80 characters in 2011?
>
> Seriously, or is that a rhetorical question?

Rhetorical :)

What it intended to demonstrate is that it is possible to rationalize
ancient habits which have their origins in particular circumstances of
those ancient times but actually nothing necessitates them today other
than the momentum built around them during their lifetime (which is a
pretty strong argument for them by the way).

Cheers,
Daniel


> People who like to have two source files side-by-side on a standard
> sized monitor, or three on a wide-screen monitor.
>
> People who need to read or edit source code on a virtual terminal rather
> than in a GUI console app.
>
> People who print out source code to read later.
>
> People with poor vision who need to use a significantly larger sized
> characters, and therefore can't fit as many on a line.
>
> People who might want to email code snippets without having them
> inconveniently wrapped by the mail client.
>
> People who don't like reading really long, overly complex, lines, and
> prefer to keep lines short for readability.
>
> And most importantly... people who want to have their code accepted into
> the Python standard library.
>
>
> Personally, I find that the discipline of keeping to 80 characters is
> good for me. It reduces the temptation of writing obfuscated Python one-
> liners when two lines would be better. The *only* time it is a burden is
> when I write doc strings, and even then, only a small one.
>
>
>
> --
> Steven
> --
> http://mail.python.org/mailman/listinfo/python-list
>


-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown



More information about the Python-list mailing list