[Python-ideas] Minor tweak to PEP 8?

M.-A. Lemburg mal at egenix.com
Wed May 11 23:50:43 CEST 2011


Steven D'Aprano wrote:
> Guido van Rossum 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)
> 
> I cringe whenever I see that. If people are going to bother lining
> things up other than at 4-space indents, they should at least line them
> up in a visually attractive place. The delimiter should surround the
> arguments, not line up with them:
> 
>         foo = long_function_name(var_one, var_two,
>                                  var_three, var_four)

See the link Guido posted: that's what they use. Looks like the
MUA dropped a blank or there was a tab/space issue involved.
Whitespace tends to be mysterious sometimes ;-)

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, May 11 2011)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2011-06-20: EuroPython 2011, Florence, Italy               40 days to go

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/



More information about the Python-ideas mailing list