On 2018-07-23 10:51, Steve Dower wrote:
[snip]

False: 'a?.b' is totally different from 'a.b'
---------------------------------------------

The expression 'a.b' either results in 'a.b' or AttributeError (assuming
no descriptors are involved).

The expression 'a?.b' either results in 'a.b' or None (again, assuming
no descriptors).

It could still raise AttributeError.

This isn't a crazy new idea, it really just short-circuits a specific
error that can only be precisely avoided with "if None" checks (catching
AttributeError is not the same).

[snip]
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to