mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
remove some __getslice__
This commit is contained in:
parent
933d3731de
commit
838c7b3619
2 changed files with 1 additions and 7 deletions
|
@ -139,8 +139,6 @@ class SubPattern:
|
||||||
return self.data[index]
|
return self.data[index]
|
||||||
def __setitem__(self, index, code):
|
def __setitem__(self, index, code):
|
||||||
self.data[index] = code
|
self.data[index] = code
|
||||||
def __getslice__(self, start, stop):
|
|
||||||
return SubPattern(self.pattern, self.data[start:stop])
|
|
||||||
def insert(self, index, code):
|
def insert(self, index, code):
|
||||||
self.data.insert(index, code)
|
self.data.insert(index, code)
|
||||||
def append(self, code):
|
def append(self, code):
|
||||||
|
|
|
@ -597,11 +597,7 @@ _1M = 1024*1024
|
||||||
_1G = 1024 * _1M
|
_1G = 1024 * _1M
|
||||||
_2G = 2 * _1G
|
_2G = 2 * _1G
|
||||||
|
|
||||||
# Hack to get at the maximum value an internal index can take.
|
MAX_Py_ssize_t = sys.maxsize
|
||||||
class _Dummy:
|
|
||||||
def __getslice__(self, i, j):
|
|
||||||
return j
|
|
||||||
MAX_Py_ssize_t = _Dummy()[:]
|
|
||||||
|
|
||||||
def set_memlimit(limit):
|
def set_memlimit(limit):
|
||||||
import re
|
import re
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue