On Tue, Jul 31, 2018, 1:47 PM Steven D'Aprano <[email protected]> wrote:
> Yes it is. Rhodri is correct, although I admit that I hadn't realised
> this point myself until he pointed it out. (That is why until now I've
> been writing examples like "spam?.eggs?.cheese?.aardvark" which is
> redundant.)
>
Again, one of the most vocal advocates of the PEP gets the semantics wrong!
`spam?.eggs?.cheese?.aardvark` is NOT redundant for `
spam?.eggs.cheese.aardvark`. The two expressions simply do different
things, but in a way guaranteed to assure that also everyone gets the
actual behaviors wrong.
Hint, run this before each expression:
spam.eggs.cheese = None
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/