]> granicus.if.org Git - python/commitdiff
remove some __getslice__
authorBenjamin Peterson <benjamin@python.org>
Tue, 27 May 2008 01:18:39 +0000 (01:18 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 27 May 2008 01:18:39 +0000 (01:18 +0000)
Lib/sre_parse.py
Lib/test/test_support.py

index e63f2acbb404b6c4ee80260b7f1ae2b977df3a34..47810193d16d34d852a6af5e37edbb7393a507f6 100644 (file)
@@ -139,8 +139,6 @@ class SubPattern:
         return self.data[index]
     def __setitem__(self, index, code):
         self.data[index] = code
-    def __getslice__(self, start, stop):
-        return SubPattern(self.pattern, self.data[start:stop])
     def insert(self, index, code):
         self.data.insert(index, code)
     def append(self, code):
index 620d625c7a44dad98e54d6c0a12635c5e83d935b..848c7d15da60db898b0397dcde122592aa848159 100644 (file)
@@ -597,11 +597,7 @@ _1M = 1024*1024
 _1G = 1024 * _1M
 _2G = 2 * _1G
 
-# Hack to get at the maximum value an internal index can take.
-class _Dummy:
-    def __getslice__(self, i, j):
-        return j
-MAX_Py_ssize_t = _Dummy()[:]
+MAX_Py_ssize_t = sys.maxsize
 
 def set_memlimit(limit):
     import re