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

Zachary Ware report at bugs.python.org
Mon Aug 19 22:43:39 CEST 2013


Zachary Ware added the comment:

A lot of this discussion has flown a rather unfortunate distance over my head, especially since I've barely had time to follow it.  But it looks to me like--given the number of other places that do the same thing as operator.index currently does--there needs to be a simple way to do the right thing somewhere accessible, which probably means a builtin.

On the other hand, it seems to me like 'a.__index__()' *should* be "the right thing" to do, but I get the feeling that making that so would be an astronomically huge change without much real benefit and lots of opportunities to break everything.  I suspect I'm also missing something fundamental in why it's not the right thing to do.

----------

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


More information about the Python-bugs-list mailing list