diff options
-rw-r--r-- | Lib/collections/abc.py | 7 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 9 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): @@ -140,6 +140,8 @@ Library - Issue #10276: Fix the results of zlib.crc32() and zlib.adler32() on buffers larger than 4GB. Patch by Nadeem Vawda. +- Issue #11388: Added a clear() method to MutableSequence + Build ----- |