def _update(config, **kw):
    """ Set configuration attributes given as keyword arguments."""
    for name, value in kw.items():
        setter = config._name_to_setter.get(name, None)
        if name is None:
            raise ValueError('Invalid setting name: {0!r}'.format(name))
        else:
            setter(value)
