commit | 1355a3dbf6ef4c6d30ace8049cb0d7632387fbbc | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Wed Apr 08 08:26:55 2009 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Wed Apr 08 08:26:55 2009 +0000 |
tree | 0df7ad0839e9f27268138ebf854efc8352f2d89e | |
parent | a5cd6375c0174558cf947150b2210ed46ae40720 [diff] [blame] |
Minor factoring.
diff --git a/Lib/collections.py b/Lib/collections.py index 7b207e3..4cffca0 100644 --- a/Lib/collections.py +++ b/Lib/collections.py
@@ -126,7 +126,7 @@ ''' 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