Message85883
The language reference is currently silent as to whether or not an
iterator's next() method is looked up on every pass around a for loop,
or whether it is OK for an implementation to look the method up once at
the start of the loop, cache the result and call it again each time
around the loop without doing the lookup again.
The language reference should require implementations to follow
CPython's behaviour in this respect: the method should be looked up
again on each pass around the loop.
As per this email on python-ideas:
http://mail.python.org/pipermail/python-ideas/2009-April/004083.html |
|
Date |
User |
Action |
Args |
2009-04-12 00:58:27 | ncoghlan | set | recipients:
+ ncoghlan, georg.brandl |
2009-04-12 00:58:27 | ncoghlan | set | messageid: <1239497907.46.0.481458734082.issue5739@psf.upfronthosting.co.za> |
2009-04-12 00:58:26 | ncoghlan | link | issue5739 messages |
2009-04-12 00:58:25 | ncoghlan | create | |
|