Ezio Melotti added the comment:

There seem to be two issues here:

> list comprehension with yield(-from) would return a generator.

This is somewhat surprising, and I'm not sure it's expected/documented.
The example you provided seems to behave reasonably, so I don't think we should 
change the behavior (unless there is some actual bug in similar example).  If 
anything, we could document this, but I'm not sure if it's worth doing it and 
where could be added.

> generator comprehension would yield some None in the middle
> of the expected values.

This also seems expected, and the behavior is consistent with the equivalent 
generator function.

----------
nosy: +ezio.melotti, gcewing, ncoghlan
versions: +Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21964>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to