Merge pull request #20990 from github/tausbn/python-support-relaxed-exception-groups

Python: Add support for PEP-758 exception syntax
This commit is contained in:
yoff
2026-01-13 19:04:27 +01:00
committed by GitHub
11 changed files with 46167 additions and 45785 deletions

View File

@@ -0,0 +1,4 @@
---
category: feature
---
* The extractor now supports the new, relaxed syntax `except A, B, C: ...` (which would previously have to be written as `except (A, B, C): ...`) as defined in [PEP-758](https://peps.python.org/pep-0758/). This may cause changes in results for code that uses Python 2-style exception binding (`except Foo, e: ...`). The more modern format, `except Foo as e: ...` (available since Python 2.6) is unaffected.