On Fri, Dec 24, 2010 at 1:08 AM, Nick Coghlan ncogh...@gmail.com wrote:
def __index__(self):
- index(self)
+ someobject[self]
return int(self)
Changing the docstring to say operator.index(self) would be the
clearest solution here.
Agreed. Certainly
Le 24/12/2010 02:08, Nick Coghlan a écrit :
On Fri, Dec 24, 2010 at 4:41 AM, eric.araujo python-check...@python.org
wrote:
Fix small inaccuracy: there is no index function
Yes, there is, it just isn't a builtin - it lives in the operator module.
Defining object.__index__ with operator.index
On 12/26/2010 7:01 PM, Nick Coghlan wrote:
Yes, the definition in the language reference could definitely be
improved to mention the semantics first, and then reference
operator.index second.
Possible wording Indicates to the Python interpreter that the object
is semantically equivalent to the
On Fri, Dec 24, 2010 at 4:41 AM, eric.araujo python-check...@python.org wrote:
Author: eric.araujo
Date: Thu Dec 23 19:41:33 2010
New Revision: 87445
Log:
Fix small inaccuracy: there is no index function
Yes, there is, it just isn't a builtin - it lives in the operator module.
def