qcodes/instrument_drivers/stahl/stahl.py
def chain(*functions: Callable[..., Any]) -> Callable[..., Any]:
    """
    The output of the first callable is piped to the input of the second, etc.

    Example:
        >>> def f():
        >>>   return "1.2"
        >>> chain(f, float)()  # return 1.2 as float
    """

    def make_iter(args: Any) -> Iterable[Any]:
        if not isinstance(args, Iterable) or isinstance(args, str):
            return args,
        return args

    def inner(*args: Any) -> Any:
        result = args
        for fun in functions:
            new_args = make_iter(result)
            result = fun(*new_args)

        return result

    return inner

    The output of the first callable is piped to the input of the second, etc.

    Example:
        >>> def f():
        >>>   return "1.2"
        >>> chain(f, float)()  # return 1.2 as float
    
The output of the first callable is piped to the input of the second, etc.
The output of the first callable is piped to the input of the second etc .
def chain(*functions: Callable[..., Any]) -> Callable[..., Any]:
    def make_iter(args: Any) -> Iterable[Any]:
        if not isinstance(args, Iterable) or isinstance(args, str):
            return args,
        return args
    def inner(*args: Any) -> Any:
        result = args
        for fun in functions:
            new_args = make_iter(result)
            result = fun(*new_args)
        return result
    return inner
def chain ( * functions : Callable [ ... , Any ] ) -> Callable [ ... , Any ] : def make_iter ( args : Any ) -> Iterable [ Any ] : if not isinstance ( args , Iterable ) or isinstance ( args , str ) : return args , return args def inner ( * args : Any ) -> Any : result = args for fun in functions : new_args = make_iter ( result ) result = fun ( * new_args ) return result return inner
The output of the first callable is piped to the input of the second, etc.
The output of the first callable is piped to the input of the second etc .
"""
    The output of the first callable is piped to the input of the second, etc.

    Example:
        >>> def f():
        >>>   return "1.2"
        >>> chain(f, float)()  # return 1.2 as float
    """
functions
Callable[..., Any]
examples
None