[Python-Dev] Re: PEP 654 except* formatting

2021年10月06日 09:34:23 -0700

That might be exceptable.
-Barry
> On Oct 6, 2021, at 08:59, Brandt Bucher <[email protected]> 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: ...
> 
> And edge-cases like this still work normally:
> 
> except some + group as e: ...
> _______________________________________________
> 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/TW5I4Z3XKCSZC6IRXHNFVPZVLHEKI7O3/
> Code of Conduct: http://python.org/psf/codeofconduct/

Attachment: signature.asc
Description: Message signed with OpenPGP

_______________________________________________
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/ICTKEKVNS4WA6VTGPHHJ2QVVGA6CKPJ3/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to