Message 195064 - Python tracker
Here is a patch. Now the code of operator.index() becomes even more complicated. Perhaps you want suggest other wording for documentation? Some code in stdlib (_pyio.py, bz2.py, connection.py) uses a.__index__() instead of type(a).__index__(a) (with replacing AttributeError to TypeError). Is it worth to change?