summaryrefslogtreecommitdiffstats
path: root/Lib/collections.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-04-08 08:28:28 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-04-08 08:28:28 (GMT)
commit446a4f23302ed3c33f32e6bd074b6752dc917b7a (patch)
treed1b64db9f9847e1d15e5640a6f2d8a10a61e7287 /Lib/collections.py
parent238018c5c47499f4e0edef681bded41b20bcb53a (diff)
downloadcpython-446a4f23302ed3c33f32e6bd074b6752dc917b7a.zip
cpython-446a4f23302ed3c33f32e6bd074b6752dc917b7a.tar.gz
cpython-446a4f23302ed3c33f32e6bd074b6752dc917b7a.tar.bz2
Minor factoring.
Diffstat (limited to 'Lib/collections.py')
-rw-r--r--Lib/collections.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/collections.py b/Lib/collections.py
index 3c1b78a..a90915a 100644
--- a/Lib/collections.py
+++ b/Lib/collections.py
@@ -122,7 +122,7 @@ class OrderedDict(dict, MutableMapping):
'''
if not self:
raise KeyError('dictionary is empty')
- key = next(reversed(self)) if last else next(iter(self))
+ key = next(reversed(self) if last else iter(self))
value = self.pop(key)
return key, value