RustPython / RustPython/Parser
Generator expression without parenthesis does not raise SyntaxError
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 117
- Forks
- 38
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 1
Description
Feature
In CPython, generator expression without parenthesis raises following error
>>> foo(x, z for z in range(10), t, w)
File "<stdin>", line 1
foo(x, z for z in range(10), t, w)
^^^^^^^^^^^^^^^^^^^^
SyntaxError: Generator expression must be parenthesized
However, In RustPython, it does not matter
>>>>> foo(x, z for z in range(10), t, w)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'foo' is not defined
Python Documentation
Contributor guide
No contributing guide indexed for this repository
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
Start by reproducing the two generator-expression examples in the issue and trace their handling in the RustPython Parser project. Done means the unparenthesized generator expression with additional arguments raises the documented SyntaxError, while valid generator expressions continue to parse correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100