[Python-ideas] Fwd: New suggested built in keyword: do
greg.ewing at canterbury.ac.nz
Fri Jun 8 21:43:33 EDT 2018
Jamie Willis wrote:
> What about just supporting filtering syntax at the top level?
> for x range(50) if x % 2: print(x)
It would be more general and probably easier to support this:
for x in range(50): if x % 2: print(x)
i.e. just relax the requirement that a statement following
on the same line after a colon must be a simple statement.
More information about the Python-ideas