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 "someobject[self]" isn't right.

(There's also a question about whether __index__ should really be
defaulting to int, but that's another issue...)

Mark
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to