Project

General

Profile

« Previous | Next » 

Revision 14584

lib/dicts.py: added pair_keys(), pair_values()

View differences:

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