[Python-ideas] while conditional in list comprehension ??

Shane Green shane at umbrellacode.com
Wed Jan 30 03:34:24 CET 2013


Sorry, that was phrased backwards: the ease of wrapping iterators increases the viability…





Shane Green 
www.umbrellacode.com
408-692-4666 | shane at umbrellacode.com

On Jan 29, 2013, at 6:31 PM, Shane Green <shane at umbrellacode.com> wrote:

> Although it's not always viable, given how easy it is to wrap an iterator, it seems like might come in handy for comprehensions.  
> 
> 	[x for x in items if x < 50 or items.close()]
> 
> 
> 
> Shane Green 
> www.umbrellacode.com
> 408-692-4666 | shane at umbrellacode.com
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130129/f639361a/attachment.html>


More information about the Python-ideas mailing list