On 23Jul2018 1111, Antoine Pitrou wrote:
On Mon, 23 Jul 2018 10:51:31 +0100
Steve Dower <steve.do...@python.org> wrote:
Which is the most important operator?
-------------------------------------
Personally, I think '?.' is the most valuable.
For me, it's the most contentious. The fact that a single '?' added to
a regular line of Python code can short-circuit execution silently is a
net detriment to readability, IMHO.
The only time it would short-circuit is when it would otherwise raise
AttributeError for trying to access an attribute from None, which is
also going to short-circuit. The difference is that it short-circuits
the expression only, and not all statements up until the next except
handler.
Cheers,
Steve
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/