Message271615
Take a look at the following code from UserList.py in Python2.7 to get an idea of how this was implemented previously:
def __getslice__(self, i, j):
i = max(i, 0); j = max(j, 0)
return self.__class__(self.data[i:j])
def __setslice__(self, i, j, other):
i = max(i, 0); j = max(j, 0)
if isinstance(other, UserList):
self.data[i:j] = other.data
elif isinstance(other, type(self.data)):
self.data[i:j] = other
else:
self.data[i:j] = list(other)
def __delslice__(self, i, j):
i = max(i, 0); j = max(j, 0)
del self.data[i:j] |
|
Date |
User |
Action |
Args |
2016-07-29 07:06:35 | rhettinger | set | recipients:
+ rhettinger, r.david.murray, serhiy.storchaka, staticshock |
2016-07-29 07:06:35 | rhettinger | set | messageid: <1469775995.54.0.526023673915.issue27639@psf.upfronthosting.co.za> |
2016-07-29 07:06:35 | rhettinger | link | issue27639 messages |
2016-07-29 07:06:35 | rhettinger | create | |
|