diff options
Diffstat (limited to 'Lib/collections/abc.py')
-rw-r--r-- | Lib/collections/abc.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/collections/abc.py b/Lib/collections/abc.py index 6e908bd..c80c7dd 100644 --- a/Lib/collections/abc.py +++ b/Lib/collections/abc.py @@ -596,6 +596,13 @@ class MutableSequence(Sequence): def append(self, value): self.insert(len(self), value) + def clear(self): + try: + while True: + self.pop() + except IndexError: + pass + def reverse(self): n = len(self) for i in range(n//2): |