Commit Graph

20 Commits

Author SHA1 Message Date
Ezio Melotti
982ef4e0bc #11845: Fix typo in rangeobject.c that caused a crash in compute_slice_indices. Patch by Daniel Urban. 2011-04-15 08:15:40 +03:00
Nick Coghlan
e993b10041 Issue 10889: Support slicing and indexing of large ranges (no docs changes, since, as far as I know, we never said anywhere that this *didn't* work) 2011-01-12 03:15:52 +00:00
Nick Coghlan
37ee850b10 Issue 2690: Add support for slicing and negative indices to range objects (includes precalculation and storage of the range length).
Refer to the tracker issue for the language moratorium implications of this change
2010-12-03 14:26:13 +00:00
Benjamin Peterson
d57bb55c7d fix two broken tests 2010-11-20 23:03:34 +00:00
Benjamin Peterson
8d16ab3c56 merge all range tests into test_range 2010-11-20 23:01:55 +00:00
Ezio Melotti
b3aedd4862 #9424: Replace deprecated assert* methods in the Python test suite. 2010-11-20 19:04:17 +00:00
Ezio Melotti
b58e0bd8bb use assert[Not]In where appropriate 2010-01-23 15:40:09 +00:00
Benjamin Peterson
577473fe68 use assert[Not]In where appropriate
A patch from Dave Malcolm.
2010-01-19 00:09:57 +00:00
Benjamin Peterson
91799ae3e1 remove 2.x specific warnings 2009-11-16 00:25:02 +00:00
Mark Dickinson
d550c9a281 Issue #7298: Fix a variety of problems leading to wrong results with
the fast versions of range.__reversed__ and range iteration.  Also
fix wrong results and a refleak for PyLong version of range.__reversed__.

Thanks Eric Smith for reviewing, and for suggesting improved tests.
2009-11-15 09:57:26 +00:00
Mark Dickinson
418f81d9b6 Issue #1766304: The range.__contains__ optimization should only be
applied to ints, not to instances of subclasses of int.
2009-09-24 20:04:23 +00:00
Mark Dickinson
3e124ae739 Issue #1766304: Optimize membership testing for ranges: 'n in range(...)'
does an O(1) check, if n is an integer.  Non-integers aren't affected.
Thanks Robert Lehmann.
2009-09-22 21:47:24 +00:00
Benjamin Peterson
c9c0f201fe convert old fail* assertions to assert* 2009-06-30 23:06:06 +00:00
Raymond Hettinger
94f5583777 Fix SystemError and a wasps nest of ref counting issues. 2009-06-12 18:40:16 +00:00
Hirokazu Yamamoto
d0d0b65885 Issue #4183: Some tests didn't run with pickle.HIGHEST_PROTOCOL.
Reviewed by Benjamin Peterson.
2008-10-23 00:38:15 +00:00
Alexandre Vassalotti
7505607ae7 Issue 2582: Fix pickling of range objects. 2008-06-10 04:03:04 +00:00
Benjamin Peterson
ee8712cda4 #2621 rename test.test_support to test.support 2008-05-20 21:35:26 +00:00
Christian Heimes
a37d4c693a Removed PyInt_GetMax and sys.maxint
I replaced sys.maxint with sys.maxsize in Lib/*.py. Does anybody see a problem with the change on Win 64bit platforms? Win 64's long is just 32bit but the sys.maxsize is now 2**63-1 on every 64bit platform.
Also added docs for sys.maxsize.
2007-12-04 23:02:19 +00:00
Walter Dörwald
2a857de62a Update name of test. 2007-05-21 18:02:40 +00:00
Walter Dörwald
4ad94210d1 Rename test_xrange.py to test_range.py and fix the
type name in various spots.
2007-05-21 18:01:17 +00:00