Revision 466
Added by Aaron Marcuse-Kubitza about 13 years ago
util.py | ||
---|---|---|
15 | 15 |
except StopIteration: pass # nothing after the matching elements |
16 | 16 |
|
17 | 17 |
def rename_key(dict_, orig, new): dict_[new] = dict_.pop(orig) |
18 |
|
|
19 |
def dict_subset(dict_, keys): dict([(key, dict_[key]) for key in keys]) |
Also available in: Unified diff
util.py: Added dict_subset()