def set_cmd(name, accepts_value=False):
    """
    Docorator that registers a ':set'-command.
    """
    def decorator(func):
        SET_COMMANDS[name] = func
        if accepts_value:
            SET_COMMANDS_TAKING_VALUE.add(name)
        return func
    return decorator
def set_cmd ( name , accepts_value = False ) : def decorator ( func ) : SET_COMMANDS [ name ] = func if accepts_value : SET_COMMANDS_TAKING_VALUE . add ( name ) return func return decorator
Docorator that registers a ':set'-command.