On 3/20/15 8:01 AM, Ed Leafe wrote:
In both of the above, the lines with 'bar' are semantically identical, but 
indented very differently. This is contrary to the spirit of Python, where 
indentation conveys semantic meaning. I strongly prefer the convention of 
indenting 2 levels for continued lines, as in:

some_object.method_with_a_very_long_name(foo,
         bar)
some_object.short_name(foo,
         bar)

This doesn't help, but I prefer:

{{{

some_object.method_with_a_very_long_name(
    foo,
    bar,
)

}}}

That's one indent level for the args. If everything fits on one line, leave it, otherwise each arg gets a line of its own, and even the final arg gets a comma.

I'm with you on the horizontal-lining-up though, except in very rare cases having to do with making lists or dictionaries from literals.

Paul


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to