[issue5739] Language reference is ambiguous regarding next() method lookup

2019-03-15 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue5739] Language reference is ambiguous regarding next() method lookup

2015-02-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Still true in the current doc https://docs.python.org/3/reference/datamodel.html#special-method-names object.__iter__ in listed in 3.3.6. Emulating container types A listing for __next__ could follow that. Both iterator special methods are documented in https://

[issue5739] Language reference is ambiguous regarding next() method lookup

2015-02-18 Thread Mark Lawrence
Mark Lawrence added the comment: Thrown up by selecting "Random Issue", if nothing else it looks to me as if __next__ is missing from and so should be documented in https://docs.python.org/3.1/reference/datamodel.html#special-method-names -- nosy: +BreamoreBoy

[issue5739] Language reference is ambiguous regarding next() method lookup

2009-04-18 Thread Nick Coghlan
Nick Coghlan added the comment: Guido didn't actually say whether or not this was originally just an implementation accident or a deliberate design choice - he just indicated that this was a case where caching the bound method should be disallowed because it could change the semantics of existin

[issue5739] Language reference is ambiguous regarding next() method lookup

2009-04-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: I was surprised when this came up with another issue. Why does CPython behave that way? Accident or justified decision? -- nosy: +tjreedy ___ Python tracker _

[issue5739] Language reference is ambiguous regarding next() method lookup

2009-04-11 Thread Nick Coghlan
New submission from Nick Coghlan : 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