Is there a more elegant way to spell this?

Mario Figueiredo marfig at gmail.com
Tue Jan 27 13:05:50 EST 2015


In article <qot7fw8s3la.fsf at ruuvi.it.helsinki.fi>, 
jpiitula at ling.helsinki.fi says...
> 
> If you mean literally some_predicate, then perhaps this.
> 
> if some_predicate:
>    for x in seq:
>       handle(x)
> 

Careful. See Chris Warrick answer for the correct position of the 'if' 
statement.



More information about the Python-list mailing list