Misleading error for ((a) := 1)
Open
interpreter-core
topic-parser
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
>>> ((a) := 1)
File "<python-input-0>", line 1
((a) := 1)
^
SyntaxError: cannot use assignment expressions with name
Of course, it can. You only need to remove parentheses around the name.
>>> (a := 1)
1
Linked PRs
- gh-138627
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two Python console examples from the issue and compare the misleading SyntaxError with the valid unparenthesized form. Review linked PR gh-138627 first; done means the parenthesized assignment expression reports the correct error or is accepted consistently with the demonstrated valid form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100