Open
Description
Bug report
Bug description:
In 3.13.3 and before
>>> bool(_ for item in False)
Traceback (most recent call last):
File "<python-input-14>", line 1, in <module>
bool(_ for item in False)
^^^^^
TypeError: 'bool' object is not iterable
>>> (_ for item in False)
Traceback (most recent call last):
File "<python-input-15>", line 1, in <module>
(_ for item in False)
^^^^^
TypeError: 'bool' object is not iterable
Now in 3.13.4
>>> bool(_ for item in False)
True
>>> (_ for item in False)
<generator object <genexpr> at 0xffffa9c02200>
This is very fundamental change. Is it expected?
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
- [3.14] GH-135171: Fix generator expressions one last time (hopefully) #135225
- [3.13] GH-135171: Fix generator expressions one last time (hopefully) (GH-135225) #135293
- gh-135171: Update documentation for the generator expression #135351
- [3.14] GH-135171: Revert async generator expressions behavior #135352
- [3.13] GH-135171: Roll back all fixes for GH-127682 as they are not suitable for 3.13 #135390
- [3.13] GH-135171: Roll back fix for GH-125038 as it's not suitable for 3.13 #135403
- [3.14] gh-135171: Update documentation for the generator expression (GH-135351) #135524
- [3.13] gh-135171: Update documentation for the generator expression (GH-135351) #135525
Metadata
Metadata
Assignees
Labels
Projects
Status
Todo