[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://docs.python.org/3/library/stdtypes.html#iterator-types

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5739
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5739
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2009-04-18 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu 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 rep...@bugs.python.org
http://bugs.python.org/issue5739
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2009-04-18 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com 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 existing programs.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5739
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2009-04-11 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@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 rep...@bugs.python.org
http://bugs.python.org/issue5739
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com