[issue5577] yield in iterators

Antoine Pitrou report at bugs.python.org
Fri Mar 27 16:48:53 CET 2009


Antoine Pitrou <pitrou at free.fr> added the comment:

Perhaps you forgot to return the value. In 3.1:

>>> def f():
...  return [(yield i) for i in range(10)]
... 
>>> f()
<generator object <listcomp> at 0x7f9bcc2257d0>

----------
nosy: +pitrou

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5577>
_______________________________________


More information about the Python-bugs-list mailing list