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
This commit is contained in:
Nick Coghlan 2010-12-03 14:26:13 +00:00
parent fad058f0ca
commit 37ee850b10
6 changed files with 291 additions and 105 deletions

View file

@ -782,8 +782,8 @@ class SizeofTest(unittest.TestCase):
# reverse
check(reversed(''), size(h + 'PP'))
# range
check(range(1), size(h + '3P'))
check(range(66000), size(h + '3P'))
check(range(1), size(h + '4P'))
check(range(66000), size(h + '4P'))
# set
# frozenset
PySet_MINSIZE = 8