Project

General

Profile

« Previous | Next » 

Revision 2649

dicts.py: Added is_dict()

View differences:

dicts.py
4 4

  
5 5
import util
6 6

  
7
def is_dict(value): return hasattr(value, '__getitem__')
8

  
7 9
class IdDict(dict):
8 10
    '''A dict that stores objects by id()'''
9 11
    

Also available in: Unified diff