Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:

On Sat, May 1, 2010 at 3:50 AM, Mark Dickinson <rep...@bugs.python.org> wrote:
>
> Mark Dickinson <dicki...@gmail.com> added the comment:
>
> Alexander: range *does* still accept such arguments (in 2.7);  just not 
> floats:
>
>>>> from decimal import Decimal
>>>> range(Decimal(20), Decimal(20))
> []

Decimal must be a special case.  With the code attached by OP and
trunk:80673, I get

$ ./python.exe bad_range.py
...
Traceback (most recent call last):
  File "bad_range.py", line 12, in <module>
    print range(MyInt(2**64), MyInt(2**64+10))
TypeError: range() integer start argument expected, got instance.

Same with new style MyInt:

$ ./python.exe bad_range1.py
...
Traceback (most recent call last):
  File "bad_range1.py", line 12, in <module>
    print range(MyInt(2**64), MyInt(2**64+10))
TypeError: range() integer start argument expected, got MyInt.

----------

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

Reply via email to