From: Benjamin Peterson Date: Tue, 27 May 2008 01:18:39 +0000 (+0000) Subject: remove some __getslice__ X-Git-Tag: v2.6b1~223 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=838c7b3619cc8c68d115235c4bf3b0ab19eb5d04;p=python remove some __getslice__ --- diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py index e63f2acbb4..47810193d1 100644 --- a/Lib/sre_parse.py +++ b/Lib/sre_parse.py @@ -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): diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index 620d625c7a..848c7d15da 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -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