[issue5823] feature request: a conditional "for" statement

2009-04-23 Thread Michael Gilbert
Michael Gilbert added the comment: hello, i've recently been working on some code where i am processing a list, but excluding certain items. the solution is to use a list comprehension in the for statement, which for example looks like: for m in [n for n in range( 0 , 5 ) if n != 2] deter

[issue5823] feature request: a conditional "for" statement

2009-04-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: You should bring this up on the python-ideas mailing list. I'm closing this unless it gets support on that list or python-dev. -- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed ___ Python

[issue5823] feature request: a conditional "for" statement

2009-04-23 Thread Michael Gilbert
New submission from Michael Gilbert : hello, i've recently been working on some code where i am processing a list, but excluding certain items. the solution is to use a list comprehension in the for statement, which for example looks like: for m in [n for n in range( 0 , 5 ) if n != 2] det