[Python-checkins] r71392 - python/trunk/Lib/collections.py
raymond.hettinger
python-checkins at python.org
Wed Apr 8 10:26:55 CEST 2009
Author: raymond.hettinger
Date: Wed Apr 8 10:26:55 2009
New Revision: 71392
Log:
Minor factoring.
Modified:
python/trunk/Lib/collections.py
Modified: python/trunk/Lib/collections.py
==============================================================================
--- python/trunk/Lib/collections.py (original)
+++ python/trunk/Lib/collections.py Wed Apr 8 10:26:55 2009
@@ -126,7 +126,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