[Python-ideas] Minor tweak to PEP 8?

Guido van Rossum guido at python.org
Wed May 11 16:23:33 CEST 2011


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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110511/c70a9e0b/attachment.html>


More information about the Python-ideas mailing list