Ramil Nugmanov <nougman...@protonmail.com> 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 <rep...@bugs.python.org>
<https://bugs.python.org/issue46674>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to