bpo-39934: Account for control blocks in 'except' in compiler. (GH-22… · python/cpython@02d126a · GitHub
Skip to content

Commit 02d126a

Browse files
authored
bpo-39934: Account for control blocks in 'except' in compiler. (GH-22395)
* Account for control blocks in 'except' in compiler. Fixes #39934.
1 parent 05cc881 commit 02d126a

3 files changed

Lines changed: 23 additions & 8 deletions

File tree

Lib/test/test_syntax.py

Lines changed: 9 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Correctly count control blocks in 'except' in compiler. Ensures that a
2+
syntax error, rather a fatal error, occurs for deeply nested, named
3+
exception handlers.

Python/compile.c

Lines changed: 11 additions & 8 deletions

0 commit comments

Comments
 (0)