function of dascore.examples source

    list_or_dict: <class ’list | <class ’dict ,
    key: str | None ,

Decorator for registering a function name in a list or dict.

If list_or_dict is a list only append the name of the function. If it is as dict append name (as key) and function as the value.


Parameter Description
list_or_dict A list or dict to which the wrapped function will be added.
key The name to use, if different than the name of the function.