[Python-ideas] Minor tweak to PEP 8?
Paul Moore
p.f.moore at gmail.com
Wed May 11 15:27:54 CEST 2011
On 11 May 2011 04:19, Carl M. Johnson <cmjohnson.mailinglist at gmail.com> wrote:
> Can we all at least agree that continuation lines should always be at least
> one space more indented than the parent line?
Like it or not,
some_string = """\
Text to be
used for something
incredibly exciting!"""
is not uncommon. I know about textwrap.dedent, but having to use a
Python function call to code a literal has always made me
uncomfortable.
I'm not saying it's right or wrong, just that there are reasonable
arguments why it might be reasonable.
What's wrong with just saying that continuation lines should be
formatted as appropriate to ensure readability, and leave it at that?
I know people have various standards of readability, but I'm willing
to assume that PEP 8 is targeted at people with some level of common
sense (anyone who is arguing "letter of the law" over something daft
like the example that started the thread is clearly trolling and could
find loopholes in anything, so why bother trying to convince them?)
Paul.
More information about the Python-ideas
mailing list