[New-bugs-announce] [issue5739] Language reference is ambiguous regarding next() method lookup

Nick Coghlan report at bugs.python.org
Sun Apr 12 02:58:27 CEST 2009


New submission from Nick Coghlan <ncoghlan at gmail.com>:

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

----------
assignee: georg.brandl
components: Documentation
messages: 85883
nosy: georg.brandl, ncoghlan
priority: normal
severity: normal
status: open
title: Language reference is ambiguous regarding next() method lookup
type: behavior

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


More information about the New-bugs-announce mailing list