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
a61ae692
Commit
a61ae692
authored
Mar 18, 2009
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use mixin methods where possible. (2.7 only -- these don't all exist in 3.0)
parent
06919a17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
18 deletions
+7
-18
Lib/collections.py
Lib/collections.py
+7
-18
No files found.
Lib/collections.py
View file @
a61ae692
...
...
@@ -69,24 +69,13 @@ class OrderedDict(dict, MutableMapping):
setdefault
=
MutableMapping
.
setdefault
update
=
MutableMapping
.
update
pop
=
MutableMapping
.
pop
def
keys
(
self
):
return
list
(
self
.
__keys
)
def
values
(
self
):
return
map
(
self
.
__getitem__
,
self
.
__keys
)
def
items
(
self
):
return
zip
(
self
.
__keys
,
self
.
values
())
def
iterkeys
(
self
):
return
iter
(
self
.
__keys
)
def
itervalues
(
self
):
return
_imap
(
self
.
__getitem__
,
self
.
__keys
)
def
iteritems
(
self
):
return
_izip
(
self
.
__keys
,
_imap
(
self
.
__getitem__
,
self
.
__keys
))
keys
=
MutableMapping
.
keys
values
=
MutableMapping
.
values
items
=
MutableMapping
.
items
iterkeys
=
MutableMapping
.
iterkeys
itervalues
=
MutableMapping
.
itervalues
iteritems
=
MutableMapping
.
iteritems
__ne__
=
MutableMapping
.
__ne__
def
__repr__
(
self
):
if
not
self
:
...
...
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