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
c57a3cb8
Commit
c57a3cb8
authored
Apr 20, 2011
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor text rearrangement.
parent
15cad7df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
Lib/collections.py
Lib/collections.py
+10
-10
No files found.
Lib/collections.py
View file @
c57a3cb8
...
...
@@ -98,16 +98,6 @@ class OrderedDict(dict):
yield
curr
.
key
curr
=
curr
.
prev
def
__reduce__
(
self
):
'Return state information for pickling'
items
=
[[
k
,
self
[
k
]]
for
k
in
self
]
inst_dict
=
vars
(
self
).
copy
()
for
k
in
vars
(
OrderedDict
()):
inst_dict
.
pop
(
k
,
None
)
if
inst_dict
:
return
(
self
.
__class__
,
(
items
,),
inst_dict
)
return
self
.
__class__
,
(
items
,)
update
=
__update
=
MutableMapping
.
update
keys
=
MutableMapping
.
keys
values
=
MutableMapping
.
values
...
...
@@ -156,6 +146,16 @@ class OrderedDict(dict):
self
.
__in_repr
=
False
return
result
def
__reduce__
(
self
):
'Return state information for pickling'
items
=
[[
k
,
self
[
k
]]
for
k
in
self
]
inst_dict
=
vars
(
self
).
copy
()
for
k
in
vars
(
OrderedDict
()):
inst_dict
.
pop
(
k
,
None
)
if
inst_dict
:
return
(
self
.
__class__
,
(
items
,),
inst_dict
)
return
self
.
__class__
,
(
items
,)
def
copy
(
self
):
'od.copy() -> a shallow copy of od'
return
self
.
__class__
(
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