[Python-ideas] Minor tweak to PEP 8?
Guido van Rossum
guido at python.org
Thu Jun 2 20:11:09 CEST 2011
FYI, I've submitted this change to PEP 8, with the help of a draft
patch by Steven Klass.
--Guido
On Wed, May 11, 2011 at 7:23 AM, Guido van Rossum <guido at python.org> wrote:
> At Google we use the following rule (from
> http://google-styleguide.googlecode.com/svn/trunk/pyguide.html#Indentation):
>
> Yes: # Aligned with opening delimiter
> foo = long_function_name(var_one, var_two,
> var_three, var_four)
>
> # 4-space hanging indent; nothing on first line
> foo = long_function_name(
> var_one, var_two, var_three,
> var_four)
>
> No: # Stuff on first line forbidden
> foo = long_function_name(var_one, var_two,
> var_three, var_four)
>
> # 2-space hanging indent forbidden
> foo = long_function_name(
> var_one, var_two, var_three,
> var_four)
>
> I propose we somehow incorporate these two allowed alternatives into PEP 8.
> They both serve a purpose.
>
> --
> --Guido van Rossum (python.org/~guido)
>
>
--
--Guido van Rossum (python.org/~guido)
More information about the Python-ideas
mailing list