[Python-checkins] cpython (3.1): Minor text rearrangement.
raymond.hettinger
python-checkins at python.org
Wed Apr 20 22:10:04 CEST 2011
http://hg.python.org/cpython/rev/e9979852fc02
changeset: 69492:e9979852fc02
branch: 3.1
parent: 69484:ef95702b555e
user: Raymond Hettinger <python at rcn.com>
date: Wed Apr 20 13:03:49 2011 -0700
summary:
Minor text rearrangement.
files:
Lib/collections.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Lib/collections.py b/Lib/collections.py
--- a/Lib/collections.py
+++ b/Lib/collections.py
@@ -98,16 +98,6 @@
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 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list