Re: [Python-Dev] r87445 - python/branches/py3k/Lib/numbers.py

2010-12-23 Thread Martin v. Löwis
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

Re: [Python-Dev] r87445 - python/branches/py3k/Lib/numbers.py

2010-12-23 Thread Antoine Pitrou
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

Re: [Python-Dev] r87445 - python/branches/py3k/Lib/numbers.py

2010-12-23 Thread É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, __index__ is used when the object is used as an index (o

Re: [Python-Dev] r87445 - python/branches/py3k/Lib/numbers.py

2010-12-23 Thread Antoine Pitrou
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) ___