Minor factoring.

This commit is contained in:
Raymond Hettinger 2009-04-08 08:28:28 +00:00
parent 238018c5c4
commit 446a4f2330
1 changed files with 1 additions and 1 deletions

View File

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