Revision 14584
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/lib/dicts.py | ||
---|---|---|
5 | 5 |
|
6 | 6 |
def is_dict(value): return hasattr(value, 'keys') |
7 | 7 |
|
8 |
def pair_keys(pair_list): return [k for k, v in pair_list] |
|
9 |
|
|
10 |
def pair_values(pair_list): return [v for k, v in pair_list] |
|
11 |
|
|
8 | 12 |
class DictProxy(UserDict.DictMixin): |
9 | 13 |
'''A proxy that forwards all accesses to an inner dict.''' |
10 | 14 |
|
Also available in: Unified diff
lib/dicts.py: added pair_keys(), pair_values()