Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109786

Re: for / while else doesn't make sense

From Ian Kelly <ian.g.kelly@gmail.com>
Newsgroups comp.lang.python
Subject Re: for / while else doesn't make sense
Date 2016-06-10 08:00 -0600
Message-ID <mailman.138.1465567247.2306.python-list@python.org> (permalink)
References <_lx6z.1194262$z22.146690@fx36.am4> <87shwlns34.fsf@elektro.pacujo.net> <CALwzidk3h0-CAeLobcC_iR2LJz9ocQwChMA9pyCaFUsaybsvYQ@mail.gmail.com>

Show all headers | View raw


On Jun 10, 2016 6:37 AM, "Marko Rauhamaa" <marko@pacujo.net> wrote:
>
> alister <alister.ware@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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: for / while else doesn't make sense alister <alister.ware@ntlworld.com> - 2016-06-10 11:18 +0000
  Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-06-10 15:31 +0300
    Re: for / while else doesn't make sense alister <alister.ware@ntlworld.com> - 2016-06-10 13:06 +0000
    Re: for / while else doesn't make sense Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-10 08:00 -0600
      Re: for / while else doesn't make sense Steven D'Aprano <steve@pearwood.info> - 2016-06-11 00:27 +1000
        Re: for / while else doesn't make sense Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-11 13:17 +1200
      Re: for / while else doesn't make sense Marko Rauhamaa <marko@pacujo.net> - 2016-06-10 19:13 +0300

csiph-web