23.02.2014 19:51, Stefan Behnel wrote:
I see a risk of interfering with in-place assignment operators, e.g.
x /= y except ZeroDivisionError: 1
might not do what one could expect, because (as I assume) it would
behave
differently from
x = x / y except ZeroDivisionError: 1
[snip]
Please note that:
x /= y if y else 0
also behaves differently from
x = x / y if y else 0
Anyway, enclosing in parens would make that expicit and clear.
Cheers.
*j
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com