On Wed, Oct 6, 2021 at 12:01 PM Brandt Bucher <brandtbuc...@gmail.com> wrote:
> Łukasz Langa wrote: > > Joking aside, since we allow any expression after 'except' 'group' then > this is indeed ambiguous. In theory! > > Another option (to remove the ambiguity) could be to move the “group” > after the expression. Bonus points for reading more clearly: > > except MemoryError group as e: … > except (KeyError, IndexError) group as e: … > except some + expression group as e: … > I like the clarity of this a lot. +100 > > And edge-cases like this still work normally: > > except some + group as e: … > _______________________________________________ > Python-Dev mailing list -- python-dev@python.org > To unsubscribe send an email to python-dev-le...@python.org > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/python-dev@python.org/message/TW5I4Z3XKCSZC6IRXHNFVPZVLHEKI7O3/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER calvin.speal...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted>
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/EAOMRSZJNBAO6PIFJ2SWC3CQQMIZSERL/ Code of Conduct: http://python.org/psf/codeofconduct/