PEP8 79 char max
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Fri Sep 6 00:01:31 EDT 2013
On Thu, 05 Sep 2013 19:59:34 -0700, Metallicow wrote:
> PEP8 needs a bit of revision anyway, In my opinion... According to
> real-world standards for equipment/devices. linking to a table/list of
> affected devices/minNumbers should be the norm. or....
I don't believe you have thought this through, or in any detail. The
first problem is, what "real-world standards" are you talking about? What
sort of devices are you referring to? How is this supposed to work in
practice? If I write a Python module, which device am I supposed to pick?
It's a particularly ill-thought-out suggestion when you consider than PEP
8 is for the Python standard library, and any document in the std lib
will be read on a vast number of different devices, using different
monitors with different screen resolutions and different widths, in
different editors using different typefaces on different operating
systems by people of different visual acuity.
The point of a coding standard for maximum line width is to average out
all those myriad differences and give something which works pretty well
overall regardless of the device. In other words, the coding standard
defines a minimum capability (in this case, "you can display at least 79
characters per line") and recommends you write to that standard.
> from codingguidelines import PEPStandards
>
> ... or something similar(Official PEP Zen Guidelines)
And that's especially badly thought out. How is an import that occurs
when the code is *run* supposed to make a difference to the way the code
is *written*?
--
Steven
More information about the Python-list
mailing list