[Python-ideas] Minor tweak to PEP 8?
Ben Finney
ben+python at benfinney.id.au
Wed May 11 10:05:12 CEST 2011
Mike Meyer <mwm at mired.org> writes:
> On Wed, 11 May 2011 13:50:42 +1000
> Ben Finney <ben+python at benfinney.id.au> wrote:
> > At least one standard (four-column) indentation level further than the
> > opening line.
>
> Still overly strict. Consider:
>
> f(long_named_argument_one, calculated_value_two(with_arguments),
> another_argument)
>
> The two-space indent is perfectly reasonable here
Maybe so; I'm not saying it's unreasonable. I'm saying it's *more*
reasonable to not have the indentation level depend on the opening line.
This generally involves breaking the opening line at a bracketing
token, such as ‘"""’, ‘(’, ‘[’, etc., as Carl's suggestion showed, so
there's no parameter on that line for lining up.
Also, that function needs to be renamed to something more descriptive
:-)
--
\ “Kissing a smoker is like licking an ashtray.” —anonymous |
`\ |
_o__) |
Ben Finney
More information about the Python-ideas
mailing list