-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)release-blockertopic-parsertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
>>> 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:
>>> 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
Linked PRs
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)release-blockertopic-parsertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done