This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients georg.brandl, ncoghlan
Date 2009-04-12.00:58:25
SpamBayes Score 0.0012631469
Marked as misclassified No
Message-id <1239497907.46.0.481458734082.issue5739@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2009-04-12 00:58:27ncoghlansetrecipients: + ncoghlan, georg.brandl
2009-04-12 00:58:27ncoghlansetmessageid: <1239497907.46.0.481458734082.issue5739@psf.upfronthosting.co.za>
2009-04-12 00:58:26ncoghlanlinkissue5739 messages
2009-04-12 00:58:25ncoghlancreate