Message161033
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. |
|
Date |
User |
Action |
Args |
2012-05-18 04:22:27 | Peter.Norvig | set | recipients:
+ Peter.Norvig, ezio.melotti, r.david.murray |
2012-05-18 04:22:27 | Peter.Norvig | set | messageid: <1337314947.34.0.914428645143.issue14845@psf.upfronthosting.co.za> |
2012-05-18 04:22:26 | Peter.Norvig | link | issue14845 messages |
2012-05-18 04:22:26 | Peter.Norvig | create | |
|