Issue #10516: adding list.clear() and list.copy() methods

This commit is contained in:
Eli Bendersky 2011-02-25 05:47:53 +00:00
parent 3108f98319
commit cbbaa96036
6 changed files with 81 additions and 2 deletions

View file

@ -844,6 +844,8 @@ class UserList(MutableSequence):
def insert(self, i, item): self.data.insert(i, item)
def pop(self, i=-1): return self.data.pop(i)
def remove(self, item): self.data.remove(item)
def clear(self): self.data.clear()
def copy(self): return self.data.copy()
def count(self, item): return self.data.count(item)
def index(self, item, *args): return self.data.index(item, *args)
def reverse(self): self.data.reverse()