Peter Norvig <pnor...@google.com> added the comment:

I agree with R. David Murray -- if "correct" means following the PEP 289 
semantics, then

list(next(F) for _ in range(10))

should be the same as

def __gen(exp):
    for _ in exp:
        yield next(F)

list(__gen(iter(range(10))))

and indeed that is the case.  So the behvavior is correct and the documentation 
is both wrong, and rather informal/incomplete.

----------

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

Reply via email to