[Python-checkins] r71393 - python/branches/py3k/Lib/collections.py
raymond.hettinger
python-checkins at python.org
Wed Apr 8 10:28:28 CEST 2009
Author: raymond.hettinger
Date: Wed Apr 8 10:28:28 2009
New Revision: 71393
Log:
Minor factoring.
Modified:
python/branches/py3k/Lib/collections.py
Modified: python/branches/py3k/Lib/collections.py
==============================================================================
--- python/branches/py3k/Lib/collections.py (original)
+++ python/branches/py3k/Lib/collections.py Wed Apr 8 10:28:28 2009
@@ -122,7 +122,7 @@
'''
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
More information about the Python-checkins
mailing list