From 446a4f23302ed3c33f32e6bd074b6752dc917b7a Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Wed, 8 Apr 2009 08:28:28 +0000 Subject: Minor factoring. --- Lib/collections.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v0.12