Revision 13361
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/lib/util.py | ||
---|---|---|
187 | 187 |
def rename_key(dict_, orig, new): dict_[new] = dict_.pop(orig) |
188 | 188 |
|
189 | 189 |
def dict_subset(dict_, keys): |
190 |
try: from ordereddict import OrderedDict
|
|
190 |
try: from collections import OrderedDict
|
|
191 | 191 |
except ImportError: subset = dict() |
192 | 192 |
else: subset = OrderedDict() |
193 | 193 |
for key in keys: |
Also available in: Unified diff
bugfix: lib/util.py: use OrderedDict from collections rather than ordereddict to work with Mac OS X 10.8 Mountain Lion (http://vegpath.org/links/#OrderedDict)