[issue1533] Bug in range() function for large values

Robert Bradshaw report at bugs.python.org
Sat Nov 29 21:45:37 CET 2008


Robert Bradshaw <robertwb at math.washington.edu> added the comment:

I think *both* behaviors are wrong, the 3.0 one is backwards
incompatible, and the 2.7 one is inconsistent (accepting MyInt if it's <
32 bits, rejecting it for > 64 bits). 

For our particular use case, it is very annoying to not be able to use
non-ints. It goes against the principle duck typing by simply defining
the __int__ and __index__ methods.

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


More information about the Python-bugs-list mailing list