Serhiy Storchaka added the comment:

> For completeness, can you post one line saying why the much simpler solution 
> "range(a).stop" is not accepted?

Because it is implementation detail. The range() function if it will be 
implemented in Python needs operator.index().

The main purpose of adding Python implementation of the operator module was to 
provide an implementation which can be used in alternative Python 
implementations (e.g. PyPy). The CPython itself doesn't use it. And now I doubt 
that such complicated implementation will be helpful.

Perhaps we need a builtin which exposes _PyType_Lookup() at Python level.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18712>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to