[Python-checkins] r63736 - in python/trunk/Lib: sre_parse.py test/test_support.py

benjamin.peterson python-checkins at python.org
Tue May 27 03:18:40 CEST 2008


Author: benjamin.peterson
Date: Tue May 27 03:18:39 2008
New Revision: 63736

Log:
remove some __getslice__


Modified:
   python/trunk/Lib/sre_parse.py
   python/trunk/Lib/test/test_support.py

Modified: python/trunk/Lib/sre_parse.py
==============================================================================
--- python/trunk/Lib/sre_parse.py	(original)
+++ python/trunk/Lib/sre_parse.py	Tue May 27 03:18:39 2008
@@ -139,8 +139,6 @@
         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):

Modified: python/trunk/Lib/test/test_support.py
==============================================================================
--- python/trunk/Lib/test/test_support.py	(original)
+++ python/trunk/Lib/test/test_support.py	Tue May 27 03:18:39 2008
@@ -597,11 +597,7 @@
 _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


More information about the Python-checkins mailing list