diff options
-rw-r--r-- | Lib/collections.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/collections.py b/Lib/collections.py index 7b207e3731..4cffca00f5 100644 --- a/Lib/collections.py +++ b/Lib/collections.py @@ -126,7 +126,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 |