Proposed new syntax

Serhiy Storchaka storchaka at gmail.com
Fri Aug 11 08:53:33 EDT 2017


10.08.17 23:28, Ian Kelly пише:
> So, perhaps a better syntax could be:
> 
> [x + 1 for x in (0, 1, 2, 999, 3, 4) if x < 5 else break]

     (0, 1, 2, 999, 3, 4) if x < 5 else break

looks too similar to the ternary operator.




More information about the Python-list mailing list