diff options
author | Eli Bendersky <eliben@gmail.com> | 2011-02-25 05:47:53 (GMT) |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2011-02-25 05:47:53 (GMT) |
commit | cbbaa96036b8467c21f2c7127a3711fcb405d00f (patch) | |
tree | eb49c673b4b8adb17eb3bf17188c65df9d5f89ea /Lib/collections/__init__.py | |
parent | 3108f983197991865c30d49de37b9a48e60c656e (diff) | |
download | cpython-cbbaa96036b8467c21f2c7127a3711fcb405d00f.zip cpython-cbbaa96036b8467c21f2c7127a3711fcb405d00f.tar.gz cpython-cbbaa96036b8467c21f2c7127a3711fcb405d00f.tar.bz2 |
Issue #10516: adding list.clear() and list.copy() methods
Diffstat (limited to 'Lib/collections/__init__.py')
-rw-r--r-- | Lib/collections/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 11a2993..4317535 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -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() |