Minor factoring.

This commit is contained in:
Raymond Hettinger 2009-04-08 08:26:55 +00:00
parent a5cd6375c0
commit 1355a3dbf6
1 changed files with 1 additions and 1 deletions

View File

@ -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