(counter_type)
return set_calculator
A decorator that assign a counter_type to its calculator.
A decorator that assign a counter_type to its calculator.
A decorator that assign a counter_type to its calculator .
def calculator(counter_type):
    """
    A decorator that assign a counter_type to its calculator.
    """

    def set_calculator(func):
        _counter_type_calculators[counter_type] = func
        return func

    return set_calculator
def calculator ( counter_type ) : def set_calculator ( func ) : _counter_type_calculators [ counter_type ] = func return func return set_calculator