def adict(*classes):
    '''Installs one or more classes to be handled as dict.
    '''
    a = True
    for c in classes:
        # if class is dict-like, add class
        # name to _dict_classes[module]
        if isclass(c) and _infer_dict(c):
            t = _dict_classes.get(c.__module__, ())
            if c.__name__ not in t:  # extend tuple
                _dict_classes[c.__module__] = t + (c.__name__,)
        else:  # not a dict-like class
            a = False
    return a  # all installed if True
Installs one or more classes to be handled as dict.
    
recipes/Python/546530_Size_of_Python_objects_revised/recipe-546530.py