def update(self, updates_dict):
    for (k, v) in updates_dict.iteritems():
        if (not hasattr(self, k)):
            raise ValueError(('Cannot set name ' + k))
        setattr(self, k, v)
def update(self, updates_dict):
    for (k, v) in updates_dict.iteritems():
        if (not hasattr(self, k)):
            raise ValueError(('Cannot set name ' + k))
        setattr(self, k, v)