> On 6 Oct 2021, at 18:48, Guido van Rossum <[email protected]> wrote: > > On Wed, Oct 6, 2021 at 9:01 AM Brandt Bucher <[email protected] > <mailto:[email protected]>> wrote: > 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: ... > > Argh. This would be very easy to overlook. As the senior author of PEP 654 I > am going to go with "except*". Since it was shown that "except group" has > ambiguous edge cases the proposals have gotten worse, which to me is a good > sign that we need to stop.
With async it goes *before* def, for, with. Can you put the group before the except in the same style? try: stuff... group except : handler... Barry > > -- > --Guido van Rossum (python.org/~guido <http://python.org/~guido>) > Pronouns: he/him (why is my pronoun here?) > <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>_______________________________________________ > Python-Dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/RRHP6VRI5PUMRSIXKFQVR2E6L523NUVC/ > Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/VJ6I6IXQOGDD3VHCDNAEWSU7FZ7QRHXW/ Code of Conduct: http://python.org/psf/codeofconduct/