Author Alexander.Belopolsky
Recipients Alexander.Belopolsky, akitada, christian.heimes, josm, loewis, mark.dickinson, rhettinger, robertwb, zanella
Date 2010-05-01.14:48:10
SpamBayes Score 9.52997e-07
Marked as misclassified No
Message-id <k2hd38f5331005010748k9173e80jf99db071add5e688@mail.gmail.com>
In-reply-to <1272700212.85.0.199948195928.issue1533@psf.upfronthosting.co.za>
Content
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.
History
Date User Action Args
2010-05-01 14:48:12Alexander.Belopolskysetrecipients: + Alexander.Belopolsky, loewis, rhettinger, mark.dickinson, christian.heimes, josm, robertwb, zanella, akitada
2010-05-01 14:48:10Alexander.Belopolskylinkissue1533 messages
2010-05-01 14:48:10Alexander.Belopolskycreate