[New-bugs-announce] [issue6334] 3.0/3.1: Bad bug in range() computation (or possible Integer problem)

Markus F.X.J. Oberhumer report at bugs.python.org
Wed Jun 24 12:51:43 CEST 2009


New submission from Markus F.X.J. Oberhumer <markus at oberhumer.com>:

Please note that the correct answer is 25, and the last element is missing !

This bug does not show on 64-bit versions (but 46337**2 is near 2**31).

~Markus


C:\Python31>python
Python 3.1rc2 (r31rc2:73414, Jun 13 2009, 16:43:15) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> len(list(range(46337**2, 46349**2, 46337)))
24

C:\Python30>python.exe
Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> len(list(range(46337**2, 46349**2, 46337)))
24

----------
components: Interpreter Core
messages: 89660
nosy: mfxmfx
severity: normal
status: open
title: 3.0/3.1: Bad bug in range() computation (or possible Integer problem)
type: behavior
versions: Python 3.0, Python 3.1

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


More information about the New-bugs-announce mailing list