On Jan 26, 2017, at 1:45 AM, Craig Rodrigues <rodrigc@crodrigues.org> wrote:On Wed, Jan 25, 2017 at 10:06 AM, Phil Mayers <p.mayers@imperial.ac.uk> wrote:
Related, see:
http://stackoverflow.com/questions/32139885/yield-in-list- comprehensions-and-generator- expressions
http://bugs.python.org/issue10544
Basically, don't use yield inside comprehensions if you don't want weirdness, AFAICT :o/
Yes, that's the exact issue!Pointed out to me on the python-dev list:My vote is that this is a bug in Python.