[issue16029] pickle.dumps(xrange(sys.maxsize)) produces xrange(0)
Mark Dickinson
report at bugs.python.org
Mon Sep 24 22:59:10 CEST 2012
Mark Dickinson added the comment:
The bug is (not surprisingly) in range_reduce in Objects/rangeobject.c, where
return Py_BuildValue("(O(iii))", Py_TYPE(r),
should be
return Py_BuildValue("(O(lll))", Py_TYPE(r),
But in writing tests for this bug, I fell over another one:
>>> import sys
>>> xrange(0, sys.maxint, sys.maxint-1)
xrange(0, -4, 2147483646)
----------
nosy: +mark.dickinson
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16029>
_______________________________________
More information about the Python-bugs-list
mailing list