-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Right now just case
without match
produces:
>>> case 1:
File "<python-input-0>", line 1
case 1:
^
SyntaxError: invalid syntax
I propose to add a better hint:
>>> case 1:
File "<python-input-0>", line 1
case 1:
^
SyntaxError: case statement must be inside match statement
I have a PR ready.
I also have several other ideas about better error messages for match
and case
:)
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-featureA feature request or enhancementA feature request or enhancement