# Bug report ### Bug description: ```python >>> try: 1/0 ... except Exception as exc: raise from exc ... File "<python-input-0>", line 2 except Exception as exc: raise from exc ^^^ SyntaxError: cannot use except statement with name ``` Should be: ```py >>> try: 1/0 ... except: raise from ValueError() ... File "<python-input-2>", line 2 except: raise from ValueError() ^^^^ SyntaxError: invalid syntax ``` ### CPython versions tested on: CPython main branch, 3.14 ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-134035 * gh-134206 <!-- /gh-linked-prs -->
Activity
sobolevn commentedon May 14, 2025
This is a regression from my commit. Sorry! Fixing
pythongh-133999: Fix `except` parsing regression in 3.14
pythongh-133999: Fix `except` parsing regression in 3.14
gh-133999: Fix `except` parsing regression in 3.14 (#134035)
pythongh-133999: Fix `except` parsing regression in 3.14 (pythonGH-13…
[3.14] gh-133999: Fix `except` parsing regression in 3.14 (GH-134035) (…
gh-134036: Update test_syntax for gh-133999 (#135204)
pythongh-133999: Fix `except` parsing regression in 3.14 (python#134035)
pythongh-134036: Update test_syntax for pythongh-133999 (python#135204)
pythongh-133999: Fix `except` parsing regression in 3.14 (python#134035)
pythongh-134036: Update test_syntax for pythongh-133999 (python#135204)
pythongh-134036: Update test_syntax for pythongh-133999 (python#135204)