mirror of
https://github.com/python/cpython.git
synced 2025-07-31 15:14:22 +00:00
Minor factoring.
This commit is contained in:
parent
a5cd6375c0
commit
1355a3dbf6
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ class OrderedDict(dict, MutableMapping):
|
||||||
'''
|
'''
|
||||||
if not self:
|
if not self:
|
||||||
raise KeyError('dictionary is empty')
|
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)
|
value = self.pop(key)
|
||||||
return key, value
|
return key, value
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue