Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
PEP654 introduced exception groups andexcept* in python3.11
Link:https://peps.python.org/pep-0654/
Right now it is possible to parseexcept* with olderast.parse(..., feature_version=(3, 10)).
Example:
>>>importast>>>code='''... try:... ...... except* Exception:... ...... '''>>>>>>ast.parse(code)<ast.Moduleobjectat0x10c685410>>>>ast.parse(code,feature_version=(3,8))<ast.Moduleobjectat0x10c685280>>>>
Which is not correct.
But, unlike#96427 it is very simple to fix. And I belive it should be fixed.
I've already applied a patch and will send it shortly after :)