On Oct 27, 2016, at 07:37 PM, Nick Badger wrote: >The problem with doing that is that it's ambiguous. There's no way of >telling which attribute is allowed to coalesce.
You could of course support exactly the same syntax being proposed as a
language change, e.g.
from operator import attrgetter
r = attrgetter('b?.x?.z')
and then you wouldn't even need the `coalesce` argument.
Cheers,
-Barry
pgp6gsyF_aVVA.pgp
Description: OpenPGP digital signature
_______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
