mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #10516: adding list.clear() and list.copy() methods
This commit is contained in:
parent
3108f98319
commit
cbbaa96036
6 changed files with 81 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue