[Python-ideas] Silent bugs - was Re: PEP8 operator must come before line break

Erik python at lucidity.plus.com
Thu Apr 14 15:41:58 EDT 2016

On 14/04/16 20:22, Serhiy Storchaka wrote:
> An argument for operators "+" and "-":
>      result = expr1 +
>      expr2
> is syntax error, while
>      result = expr1
>      + expr2
> is silent bug.

Interesting. But that bug potentially exists regardless of what PEP8 says.

This seems to me to be something that should be tackled separately.

I imagine that there are versions of 'expr2' that makes this a valid and 
useful construct (which is why it remains) - if I've missed some 
historical discussion on this then please refer me to it, I'd like to 
understand what I'm missing on first glance.


More information about the Python-ideas mailing list