src/cm/utils/misc.py
author raph
Tue, 16 Feb 2010 09:20:12 +0900
changeset 189 3cebfa984ece
parent 0 40c8f766c9b8
permissions -rw-r--r--
i18n no compile


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)