Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9479d1ad
Commit
9479d1ad
authored
Mar 04, 2011
by
Eli Bendersky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #11388: Added a clear() method to MutableSequence
parent
1bc4f193
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
Lib/collections/abc.py
Lib/collections/abc.py
+7
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/collections/abc.py
View file @
9479d1ad
...
...
@@ -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
):
...
...
Misc/NEWS
View file @
9479d1ad
...
...
@@ -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
-----
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment