Ramil Nugmanov <[email protected]> added the comment:
Yes,
[x for x in [1, 2, 3] if 1 if 1]
can be replaced with:
for x in [1, 2, 3]:
if 1:
if 1:
yield x
However this syntax is strange and leads to errors like:
[x for x in [1, 2, 3] if x is not None] >> [x for x in [1, 2, 3] if x if not
None]
----------
resolution: not a bug ->
status: closed -> open
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46674>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com