src/cm/utils/misc.py
author Simon Descarpentries <sid@sopinspace.com>
Tue, 20 Mar 2012 16:20:49 +0100
changeset 402 15dc50d16090
parent 0 40c8f766c9b8
permissions -rw-r--r--
Add a VERSION.txt file, to hold the version number of the designated comt release


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)