Author akitada
Recipients akitada, belopolsky, christian.heimes, josm, rhettinger, robertwb, zanella
Date 2008-11-29.20:28:13
SpamBayes Score 1.29978e-05
Marked as misclassified No
Message-id <1227990496.09.0.0547512594422.issue1533@psf.upfronthosting.co.za>
In-reply-to
Content
I'm just curious to know which is the right behavior.

# Python 3.0
Traceback (most recent call last):
  File "bad_range.py", line 7, in <module>
    print(range(MyInt(2**3), MyInt(2**3+10)))
TypeError: 'MyInt' object cannot be interpreted as an integer

# Python 2.7a0
[8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
here
[18446744073709551616L, 18446744073709551617L, 18446744073709551618L,
18446744073709551619L, 18446744073709551620L, 18446744073709551621L,
18446744073709551622L, 18446744073709551623L, 18446744073709551624L,
18446744073709551625L]
Traceback (most recent call last):
  File "bad_range.py", line 11, in <module>
    print(range(MyInt(2**64), MyInt(2**64+10)))
TypeError: range() integer start argument expected, got instance.
History
Date User Action Args
2008-11-29 20:28:16akitadasetrecipients: + akitada, rhettinger, belopolsky, christian.heimes, josm, robertwb, zanella
2008-11-29 20:28:16akitadasetmessageid: <1227990496.09.0.0547512594422.issue1533@psf.upfronthosting.co.za>
2008-11-29 20:28:15akitadalinkissue1533 messages
2008-11-29 20:28:13akitadacreate