[issue18712] Pure Python operator.index doesn't match the C version.

Serhiy Storchaka report at bugs.python.org
Tue Aug 13 11:58:05 CEST 2013


Serhiy Storchaka added the comment:

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?

----------
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file31273/operator_index.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18712>
_______________________________________


More information about the Python-bugs-list mailing list