On Tue, Mar 3, 2020 at 3: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.
What's the advantage? ChrisA _______________________________________________ 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/D7E7GCJDRML4UOUDIILKLK4O5ENDWBZU/ Code of Conduct: http://python.org/psf/codeofconduct/