[Python-3000] Is this a bug with list comprehensions or not?

Nick Coghlan ncoghlan at gmail.com
Sun Jul 13 14:56:21 CEST 2008


Antoine Pitrou wrote:
> Solving the problem at hand would require carefully flagging StopIteration
> exceptions to know whether they were raised in an iterator implementation
> context or not, or even downright forbidding raising them in a non-iterator
> implementation context. It's a lot of complication for such a corner case.

Particularly when the current behaviour is trivial to explain given the 
expanded forms of the two expressions as nested functions.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-3000 mailing list