[Python-ideas] Minor tweak to PEP 8?

Mike Meyer mwm at mired.org
Wed May 11 18:24:38 CEST 2011


On Thu, 12 May 2011 00:54:32 +1000
Steven D'Aprano <steve at pearwood.info> wrote:

> Paul Moore wrote:
> > What's wrong with just saying that continuation lines should be
> > formatted as appropriate to ensure readability, and leave it at that?
> +1

-1.

This sentiment is adequately expressed by the "A Foolish Consistency
..." section. It shouldn't need repeating.

> I think that specifying exactly how to indent continuation lines, or 
> even whether or not to indent them, is way too controlling for my 
> tastes. I don't believe it makes that much difference. Like the brace 
> wars, if there actually was any objective, meaningful, consistent 
> benefit of one style over the others, there would be no argument about 
> it. Instead, it's all subjective, vague, and far from consistent.

If you don't believe it makes much different "whether or not to indent
them", I suggest you align all continuation lines on the left hand
side of the page in code you have to maintain and then report back to
us.

As for there being no benefit for one choice over another - that's
true about almost everything in the PEP (four space indent instead of
tabs?  80 character or 79 characters lines? spaces around = with
exceptions?  No spaces before/after "." and after open parens or
before close parens?  etc.). The goal is consistency. The important
thing isn't so much what we choose as that we choose something so
it'll be consistent when it doesn't make any difference.

	<mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/
Independent Software developer/SCM consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org



More information about the Python-ideas mailing list