src/cm/utils/misc.py
author raph
Fri, 14 May 2010 15:16:01 +0200
changeset 276 0e0884a093bc
parent 0 40c8f766c9b8
permissions -rw-r--r--
add comments_auto_display parameter to embed to auto expand comments


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)