[issue1533] Bug in range() function for large values
Robert Bradshaw
report at bugs.python.org
Sat Dec 1 01:28:10 CET 2007
New submission from Robert Bradshaw:
Range accepts arguments coerce-able into ints via __int__, but rejects
arguments coerce-able into longs but to large to fit into an int.
The problem is in handle_range_longs in bltinmodule.c:1527-1541. If they
type is not an int or long, it should try to make it so before failing
(for consistency with smaller values at least).
Attached is a file that reproduces this bug.
----------
components: Interpreter Core, Library (Lib)
files: bad_range.py
messages: 58034
nosy: robertwb
severity: normal
status: open
title: Bug in range() function for large values
type: crash
versions: Python 2.5
Added file: http://bugs.python.org/file8839/bad_range.py
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1533>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bad_range.py
Type: application/octet-stream
Size: 236 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-bugs-list/attachments/20071201/8e3e9c22/attachment.obj
More information about the Python-bugs-list
mailing list