This feels a lot like a really verbose way of having nulls-safe operators. On Mon, Mar 2, 2020, 10:40 AM Soni L. <fakedme...@gmail.com> wrote:
> All operations on None should raise a NoneError, which should be a > TypeError for backwards compatibility. > > try: > x = a[b][c][d][e][f] + g.foo(h) > except NoneError: > x = None > > we can then look into merging the proposals of None-aware operators and > Exception-aware operators such that the Exception-aware operators > fallback to NoneError if no exception type is provided. > > we should also look into making "except" default to using NoneError > instead of BaseException, with a future flag. > _______________________________________________ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/FJZFLUGIGR5DWEYYUZK5LV3ULYNQSGBZ/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/GPOY4VNZ7TEIE3DNDM2CWWFSY22MJLNA/ Code of Conduct: http://python.org/psf/codeofconduct/