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


Groups > comp.lang.python > #31612 > unrolled thread

Re: A desperate lunge for on-topic-ness

Started byMark Lawrence <breamoreboy@yahoo.co.uk>
First post2012-10-18 10:12 +0100
Last post2012-10-18 10:12 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: A desperate lunge for on-topic-ness Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-10-18 10:12 +0100

#31612 — Re: A desperate lunge for on-topic-ness

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2012-10-18 10:12 +0100
SubjectRe: A desperate lunge for on-topic-ness
Message-ID<mailman.2413.1350551564.27098.python-list@python.org>
On 18/10/2012 07:06, Zero Piraeus wrote:
> :
>
> Okay, so, first thing vaguely Python-related that comes to mind [so
> probably not even slightly original, but then that's not really the
> point]:
>
> What are people's preferred strategies for dealing with lines that go
> over 79 characters? A few I can think of off the bat:
>
> 1. Say "screw it" and go past 79, PEP8 be damned.
>
> 2. Say "screw it" and break the line using a backslash.
>
> 3. Say "well, at least it's not a backslash" and break the line using
> parentheses.
>
> 4. Spend 45 minutes trying to think up shorter [but still sensible]
> variable names to make it fit.
>
> 5. Perform an otherwise pointless assignment to a temp variable on the
> previous line to make it fit.
>
> 6. Realise that if it's that long, it probably shouldn't have been a
> list comprehension in the first place.
>
> Any I've missed? Any preferences?
>
>   -[]z.
>

I suggest re-reading PEP 8, particularly the section titled "A Foolish 
Consistency is the Hobgoblin of Little Minds" and specifically the first 
sentence of the third paragraph "But most importantly: know when to be 
inconsistent -- sometimes the style guide just doesn't apply."

-- 
Cheers.

Mark Lawrence.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web