Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51530
| References | <mailman.5257.1375127041.3114.python-list@python.org> <51f6d9f6$0$30000$c3e8da3$5496439d@news.astraweb.com> <op.w00ajsxia8ncjz@gnudebeest> |
|---|---|
| From | Joshua Landau <joshua@landau.ws> |
| Date | 2013-07-30 01:11 +0100 |
| Subject | Re: PEP8 79 char max |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5295.1375143127.3114.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
On 30 July 2013 00:08, Rhodri James <rhodri@wildebst.demon.co.uk> wrote: > On Mon, 29 Jul 2013 22:09:10 +0100, Steven D'Aprano < > steve+comp.lang.python@**pearwood.info<steve%2Bcomp.lang.python@pearwood.info>> > wrote: > > On Mon, 29 Jul 2013 15:43:49 -0400, Devyn Collier Johnson wrote: >> >> In Python programming, the PEP8 recommends limiting lines to a maximum >>> of 79 characters because "There are still many devices around that are >>> limited to 80 character lines" >>> (http://www.python.org/dev/**peps/pep-0008/#code-lay-out<http://www.python.org/dev/peps/pep-0008/#code-lay-out>). >>> What devices >>> cannot handle 80 or more characters on a line? >>> >> >> The only one I can think of is actual xterms (Ctrl-Alt-Function key >> terminals on Unix and Linux). But I think that's actually a red-herring. >> At least for me, I don't care about devices with 80 character lines. >> (Smart phones? Or is that more likely to be 40 character lines?) >> >> I care about being able to put multiple windows side-by-side, or a single >> window with code in one pane and a class map at the side. I care about >> being able to copy and paste code into an email, or Usenet post, without >> it being mangled. I care about *never* having to scroll left-to-right in >> order to read a line. >> >> And most of all, I care about lines being short enough to read without >> eye strain and mental fatigue from excessive horizontal width. >> > > +1 > > I'm working on some shonky C code at the moment that inconsistent > indentation and very long lines. It is extremely annoying not to be able > to put the original code, my "translation" and sundry utilities all > side-by-side on the same screen (and it's not a particularly small screen), > and having to keep flipping between them slows me down dramatically. Long > lines have no effect on the speed of the program, but they can have serious > effects on the speed of the programmer. > Then just wrap it. This is a very automatable thing for editors. There might even be a clever hard-wrap somewhere. I just tried pyformat -- that works wonders.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
PEP8 79 char max Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-29 15:43 -0400
Re: PEP8 79 char max John Gordon <gordon@panix.com> - 2013-07-29 20:30 +0000
Re: PEP8 79 char max Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-29 21:09 +0000
Re: PEP8 79 char max "Rhodri James" <rhodri@wildebst.demon.co.uk> - 2013-07-30 00:08 +0100
Re: PEP8 79 char max Joshua Landau <joshua@landau.ws> - 2013-07-30 01:11 +0100
Re: PEP8 79 char max "Rhodri James" <rhodri@wildebst.demon.co.uk> - 2013-07-30 01:41 +0100
Re: PEP8 79 char max Joshua Landau <joshua@landau.ws> - 2013-07-30 03:12 +0100
Re: PEP8 79 char max Cameron Simpson <cs@zip.com.au> - 2013-07-31 07:32 +1000
Re: PEP8 79 char max llanitedave <llanitedave@veawb.coop> - 2013-07-31 00:30 -0700
csiph-web