]> granicus.if.org Git - python/commit
Bug 1003935: xrange overflows
authorTim Peters <tim.peters@gmail.com>
Sun, 8 Aug 2004 07:17:39 +0000 (07:17 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 8 Aug 2004 07:17:39 +0000 (07:17 +0000)
commitfeec4533e21a612e9a5b665c27b1a3eb84e04bb3
treee721c83b44443f2cbda66a7acab7ddd4cd30a9d6
parentd976ab7caf098eecf44173bbce8101f13ce79d86
Bug 1003935:  xrange overflows

Added XXX comment about why the undocumented PyRange_New() API function
is too broken to be worth the considerable pain of repairing.

Changed range_new() to stop using PyRange_New().  This fixes a variety
of bogus errors.  Nothing in the core uses PyRange_New() now.

Documented that xrange() is intended to be simple and fast, and that
CPython restricts its arguments, and length of its result sequence, to
native C longs.

Added some tests that failed before the patch, and repaired a test that
relied on a bogus OverflowError getting raised.
Doc/lib/libfuncs.tex
Lib/test/test_xrange.py
Objects/rangeobject.c