[New-bugs-announce] [issue46674] Two if in a row in generators

Ramil Nugmanov report at bugs.python.org
Mon Feb 7 04:44:17 EST 2022


New submission from Ramil Nugmanov <rainugmanov at kpfu.ru>:

treat without error two if in generators.

>>>[x for x in [1, 2, 3] if 1 if 1]
[1, 2, 3]

>>>[x for x in [1, 2, 3] if 0 if 1]
[]

expected syntax error

----------
components: Parser
messages: 412726
nosy: lys.nikolaou, pablogsal, stsouko
priority: normal
severity: normal
status: open
title: Two if in a row in generators
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46674>
_______________________________________


More information about the New-bugs-announce mailing list