Message104719
On Sat, May 1, 2010 at 3:50 AM, Mark Dickinson <report@bugs.python.org> wrote:
>
> Mark Dickinson <dickinsm@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. |
|
Date |
User |
Action |
Args |
2010-05-01 14:48:12 | Alexander.Belopolsky | set | recipients:
+ Alexander.Belopolsky, loewis, rhettinger, mark.dickinson, christian.heimes, josm, robertwb, zanella, akitada |
2010-05-01 14:48:10 | Alexander.Belopolsky | link | issue1533 messages |
2010-05-01 14:48:10 | Alexander.Belopolsky | create | |
|