-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
easyinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
After the implementation of https://peps.python.org/pep-0709/, this comment looks wrong:
Lines 4079 to 4090 in 57e3c59
| /* List and set comprehensions and generator expressions work by creating a | |
| nested function to perform the actual iteration. This means that the | |
| iteration variables don't leak into the current scope. | |
| The defined function is called immediately following its definition, with the | |
| result of that call being the result of the expression. | |
| The LC/SC version returns the populated container, while the GE version is | |
| flagged in symtable.c as a generator, so it returns the generator object | |
| when the function is called. | |
| Possible cleanups: | |
| - iterate over the generator sequence instead of using recursion | |
| */ |
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
- gh-125832: Clarify comment for inlined comprehensions as per PEP-709 #126322
- [3.13] gh-125832: Clarify comment for inlined comprehensions as per PEP-709 (gh-126322) #126344
- [3.12] gh-125832: Clarify comment for inlined comprehensions as per P… #126345
- gh-125832: Reformat comments for inlined comprehensions #126346
efimov-mikhail
Metadata
Metadata
Assignees
Labels
easyinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error