Message76623
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. |
|
Date |
User |
Action |
Args |
2008-11-29 20:28:16 | akitada | set | recipients:
+ akitada, rhettinger, belopolsky, christian.heimes, josm, robertwb, zanella |
2008-11-29 20:28:16 | akitada | set | messageid: <1227990496.09.0.0547512594422.issue1533@psf.upfronthosting.co.za> |
2008-11-29 20:28:15 | akitada | link | issue1533 messages |
2008-11-29 20:28:13 | akitada | create | |
|