+1

Python has always seemed to me to allow one to completely describe exactly what 
you are iterating over in a for loop in the one line containing the for 
statement. And that is more or less the principle I tend to follow, unless the 
for statement simply gets to be too long. I have even used the `for item in 
(item for item in items if ... ):`, although this is sometimes too much of a 
brainflick to be worth it. I have also used (on separate lines) `subset = (item 
for item in items if ...); for item in subset:`, but if for...in...if syntax 
ever became available, I'd wear it out.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/LQMH4RK23MRNXBJTH7VVEZGHAZ7ENJIJ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to