On Fri, Dec 24, 2010 at 1:08 AM, Nick Coghlan 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 "someobj
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 Mon, Dec 27, 2010 at 3:13 AM, Éric Araujo wrote:
> Le 24/12/2010 02:08, Nick Coghlan a écrit :
>> On Fri, Dec 24, 2010 at 4:41 AM, eric.araujo
>> wrote:
>>> Fix small inaccuracy: there is no index function
>>
>> Yes, there is, it just isn't a builtin - it lives in the operator module.
> Defin
Le 24/12/2010 02:08, Nick Coghlan a écrit :
> On Fri, Dec 24, 2010 at 4:41 AM, eric.araujo
> 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 seems pretty circula
On Fri, Dec 24, 2010 at 4:41 AM, eric.araujo 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 __index__(self):
> -