for / while else doesn't make sense

Ian Kelly ian.g.kelly at gmail.com
Fri Jun 10 10:00:43 EDT 2016


On Jun 10, 2016 6:37 AM, "Marko Rauhamaa" <marko at pacujo.net> wrote:
>
> alister <alister.ware at ntlworld.com>:
>
> > Or more simply a hard fixed RULE (MUST be less than X lines) is Bad.
>
> It's not X lines, it's "you must see the whole function at once."
>
> If your display can show 1,500 lines at once, that's your limit. Mine
> shows 70.

I disagree on that point. For a typical-size display, it's a reasonable
guideline. But just because your 1500-line function fits in a single screen
does not make it readable. In particular, if the function is deeply nested,
then it quickly becomes difficult to discern which code aligns with which.

A similar principle informs us that 70-100 columns is a reasonable line
length limit for readability even if your display can fit much more.



More information about the Python-list mailing list