(callbacks: Iterable[Callable], errbacks: Iterable[Callable], input, *a, **kw)
return d
Return a Deferred built by chaining the given callbacks and errbacks
Return a Deferred built by chaining the given callbacks and errbacks
Return a Deferred built by chaining the given callbacks and errbacks
def process_chain_both(callbacks: Iterable[Callable], errbacks: Iterable[Callable], input, *a, **kw) -> Deferred:
    """Return a Deferred built by chaining the given callbacks and errbacks"""
    d = Deferred()
    for cb, eb in zip(callbacks, errbacks):
        d.addCallbacks(
            callback=cb, errback=eb,
            callbackArgs=a, callbackKeywords=kw,
            errbackArgs=a, errbackKeywords=kw,
        )
    if isinstance(input, failure.Failure):
        d.errback(input)
    else:
        d.callback(input)
    return d
def process_chain_both ( callbacks : Iterable [ Callable ] , errbacks : Iterable [ Callable ] , input , * a , * * kw ) -> Deferred : d = Deferred ( ) for cb , eb in zip ( callbacks , errbacks ) : d . addCallbacks ( callback = cb , errback = eb , callbackArgs = a , callbackKeywords = kw , errbackArgs = a , errbackKeywords = kw , ) if isinstance ( input , failure . Failure ) : d . errback ( input ) else : d . callback ( input ) return d