On 10 September 2016 at 18:26, Guido van Rossum <gu...@python.org> wrote: > IMO the key syntax is > simply one for accessing attributes returning None instead of raising > AttributeError, so that e.g. `foo?.bar?.baz` is roughly equivalent to > `foo.bar.baz if (foo is not None and foo.bar is not None) else None`, > except evaluating foo and foo.bar only once.
If we're not looking to use all the other null-coalescing variants (?=, ?(), ...) - which is something I'm pleased about, as I do think that scattering that many ?'s about is likely to lead to ugly code - then it would probably be fine to just use ? for this operation, so we'd have foo?bar?baz rather than needing foo?.bar?.baz. Paul _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/