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


Groups > comp.lang.python > #51582

Re: PEP8 79 char max

References (2 earlier) <CANc-5UwuE2w7d9NHaaWDwYeLtE6aSQrGXoTMx4k9xYxa6T6UfA@mail.gmail.com> <CAN1F8qWpgKRmF8bUq5_=uiMGnjmEHnWu_r+rjVcmmrOddDLCoQ@mail.gmail.com> <mailman.5309.1375193222.3114.python-list@python.org> <b5q232F3icnU1@mid.individual.net> <CANc-5UyC=ELGbNxM8=txAgm4uv5iUTsyBvn_b7a78RNqeXVKcA@mail.gmail.com>
From Joshua Landau <joshua@landau.ws>
Date 2013-07-30 17:41 +0100
Subject Re: PEP8 79 char max
Newsgroups comp.lang.python
Message-ID <mailman.5324.1375202530.3114.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 30 July 2013 16:44, Skip Montanaro <skip@pobox.com> wrote:

> > So if everyone basically follows PEP8 we all benefit from playing by
> > the same game rules, as it were.
>
> (I think I'm agreeing with you, but nonetheless, I will forge ahead.)
>
> To the extent that 80-column window widths have been common for so
> long, PEP 8 or not (and Python or not), there is a ton of code out
> there which abides by that convention.  More-or-less unilaterally
> increasing the recommended max line width to 100 (or 99?) columns
> isn't likely to improve things.  People like me (who prefer the status
> quo) will complain about all the new-fangled code written to a wider
> standard (and will be tempted to reformat).  People who like the new
> standard will complain about old code wasting all that white space
> (and will be tempted to reformat). :-)
>
> Finally (I promise this is my last word on the topic), most lines
> don't need to be wrapped as they stand today.  See the attached graph
> for the distribution of line lengths for the current project where I
> spend most of my time these days (just Python code, blank lines
> elided, comment lines included).  Stretching the max out to 100
> columns when most lines are less than 60 columns just wastes screen
> real estate.
>

Your graph doesn't convince me.

Take this line from earlier, which is currently 102 characters and nearing
my personal limit.

    completer = completer.Completer(bindings=[r'"\C-xo": overwrite-mode',
r'"\C-xd": dump-functions'])

Under rules to wrap to 80 characters (and in this case I'd probably do it
anyway), I'd normally wrap to this:

    completer = completer.Completer(bindings=[
  r'"\C-xo": overwrite-mode',
  r'"\C-xd": dump-functions'
    ])

of line lengths 46, 36, 35 and 6 respectively. Thus it's impossible to so
easily tell how many lines would be "unwrapped" from your graph.

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


Thread

Re: PEP8 79 char max Skip Montanaro <skip@pobox.com> - 2013-07-30 09:06 -0500
  Re: PEP8 79 char max Neil Cerutti <neilc@norwich.edu> - 2013-07-30 14:49 +0000
    Re: PEP8 79 char max Skip Montanaro <skip@pobox.com> - 2013-07-30 10:44 -0500
    Re: PEP8 79 char max Joshua Landau <joshua@landau.ws> - 2013-07-30 17:41 +0100

csiph-web