src/cm/utils/misc.py
author raph
Thu, 15 Jul 2010 16:10:29 +0200
changeset 292 3442202aff1a
parent 0 40c8f766c9b8
permissions -rw-r--r--
add parameter to display "decorated" creator (used with api calls)


def update(obj, kwargs):
    """
    Update obj attributes with values from kwargs
    """
    for k,v in kwargs.items():
        if hasattr(obj,k):
            setattr(obj,k,v)