Minor factoring.
This commit is contained in:
parent
238018c5c4
commit
446a4f2330
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue