On Jun 14, 2013, at 05:04 PM, Felipe Reyes wrote:

>Hi All,
>
>On Fri, Jun 14, 2013 at 04:30:16PM -0400, Barry Warsaw wrote:
>> It's bad form to use parentheses in this situation, but it *is* legal.  It
>> doesn't bother me if python-mode passive/aggressively discourage such bad
>> form, but others might disagree.  OTOH, this, which is perfectly fine form,
>> seems to work well:
>> 
>> def foo():
>>     if (foo &&
>>         baz):
>>         bar()
>> 
>> (i.e. parens used to span multiple lines.)
>
>This example raises a pep8 warning[0],

Note that PEP 8 doesn't really recommend against this.  There's even an
example in the Maximum Line Length section that has this very "problem".

It's also true that there's no single convention or recommendation for dealing
with this.

>I've been dealing with it and manually
>adding another indentation level to not leave 'baz' aligned with 'baz()'
>
>def foo():
>    if (foo &&
>            baz):
>        bar()
>
>Can this be considered a bug?

I think python-mode should be able to handle it, but it needs to be
configurable.

-Barry

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode

Reply via email to