Am 23.12.2010 22:09, schrieb Éric Araujo:
> Le 23/12/2010 20:55, Antoine Pitrou a écrit :
>>> def __index__(self):
>>> -"""index(self)"""
>>> +"""someobject[self]"""
>>
>> This is misleading as to what the method actually does,
> Really? Unless I misunderstood the docs, __inde
On Thu, 23 Dec 2010 22:09:15 +0100
Éric Araujo wrote:
> Le 23/12/2010 20:55, Antoine Pitrou a écrit :
> >> def __index__(self):
> >> -"""index(self)"""
> >> +"""someobject[self]"""
> >
> > This is misleading as to what the method actually does,
> Really? Unless I misundersto
Le 23/12/2010 20:55, Antoine Pitrou a écrit :
>> def __index__(self):
>> -"""index(self)"""
>> +"""someobject[self]"""
>
> This is misleading as to what the method actually does,
Really? Unless I misunderstood the docs, __index__ is used when the
object is used as an index (o
On Thu, 23 Dec 2010 19:41:33 +0100 (CET)
eric.araujo wrote:
>
> def __index__(self):
> -"""index(self)"""
> +"""someobject[self]"""
This is misleading as to what the method actually does, as you can read
in the implementation:
> return int(self)
___