Is this PEP-able? fwhile

rusi rustompmody at gmail.com
Tue Jun 25 02:04:23 EDT 2013


On Tuesday, June 25, 2013 4:44:44 AM UTC+5:30, alex23 wrote:
> I'd probably just go with a generator expression to feed the for loop:
> 
>      for X in (i for i in ListY if conditionZ):
> 
>          ....

Nice idiom -- thanks
Yes it does not correspond to a takewhile (or break in the control structure world).  It does correspond to a filter



More information about the Python-list mailing list