[issue1533] Bug in range() function for large values

Alexander Belopolsky report at bugs.python.org
Sat May 1 17:35:56 CEST 2010


Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:

On Sat, May 1, 2010 at 10:59 AM, Mark Dickinson <report at bugs.python.org> wrote:
>
> Mark Dickinson <dickinsm at gmail.com> added the comment:
>
> Decimal is behaving in exactly the same way as MyInt, isn't it?
> What do you get for range(MyInt(20), MyInt(20))?
>

Hmm, maybe there is a 2.7 bug here after all:

[20, 21, 22]
>>> range(MyInt(2**64), MyInt(2**64+3))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: range() integer start argument expected, got instance.

Same with Decimal:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: range() integer start argument expected, got Decimal.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1533>
_______________________________________


More information about the Python-bugs-list mailing list