This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zero79
Recipients zero79
Date 2009-04-23.22:10:01
SpamBayes Score 0.0009933645
Marked as misclassified No
Message-id <1240524604.94.0.135132223816.issue5823@psf.upfronthosting.co.za>
In-reply-to
Content
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]

determining what's going on here isn't immediately obvious (i.e. what's 
this new variable n doing?).  it would be nice to have a more 
streamlined syntax such as:

  for m in range( 0 , 5 ) with m != 2

which is much cleaner and obvious.  the statements following "with" 
could be any conditional expression.

this is just a wishlist item, and i understand that it wouldn't have 
much priority in the grand scheme of things.  thank you for your 
consideration.
History
Date User Action Args
2009-04-23 22:10:05zero79setrecipients: + zero79
2009-04-23 22:10:04zero79setmessageid: <1240524604.94.0.135132223816.issue5823@psf.upfronthosting.co.za>
2009-04-23 22:10:02zero79linkissue5823 messages
2009-04-23 22:10:01zero79create