Guido sees the light: PEP 8 updated
Marko Rauhamaa
marko at pacujo.net
Sun Apr 17 07:01:15 EDT 2016
Rustom Mody <rustompmody at gmail.com>:
> On Saturday, April 16, 2016 at 10:22:10 PM UTC+5:30, Marko Rauhamaa wrote:
>> A max line length of 79 characters is among the *only* rigorous
>> principles I judge coding style on.
>>
>> It comes with the maxim that one function must be visible at once on the
>> screen.
>
> Thats a strange self-contradiction.
Why? You are allowed to break a function into subfunctions, you know.
In fact, if you find yourself introducing coding "paragraphs" with
comments:
def f(...):
# I'll start by doing this
...
# segueing into the middle portion
...
# and finish it off as follows
...
you had better break those paragraphs off into separate functions. Just
turn your comments into function names.
Marko
More information about the Python-list
mailing list