7.2.6.1. add_function

add_function(dsp, inputs_kwargs=False, inputs_defaults=False, **kw)[source]

Decorator to add a function to a dispatcher.

Parameters:
  • dsp (schedula.Dispatcher) – A dispatcher.
  • inputs_kwargs (bool) – Do you want to include kwargs as inputs?
  • inputs_defaults (bool) – Do you want to set default values?
  • kw (dict) – See :func:~`schedula.Dispatcher.add_function`.
Returns:

Decorator.

Return type:

callable

Example:

digraph dmap { graph [ratio=1] node [style=filled] label = <dmap> splines = ortho style = filled 464 [label=<<TABLE border="0" cellspacing="0"><TR><TD border="0" colspan="2">a</TD></TR></TABLE>> fillcolor=cyan shape=box style="rounded,filled" tooltip=a] 465 [label=<<TABLE border="0" cellspacing="0"><TR><TD border="0" colspan="2">b</TD></TR></TABLE>> fillcolor=cyan shape=box style="rounded,filled" tooltip=b] 466 [label=<<TABLE border="0" cellspacing="0"><TR><TD border="0" colspan="2">c</TD></TR></TABLE>> fillcolor=cyan shape=box style="rounded,filled" tooltip=c] 467 [label=<<TABLE border="0" cellspacing="0"><TR><TD border="0" colspan="2">d</TD></TR></TABLE>> fillcolor=cyan shape=box style="rounded,filled" tooltip=d] 468 [label=<<TABLE border="0" cellspacing="0"><TR><TD border="0" colspan="2">e</TD></TR></TABLE>> fillcolor=cyan shape=box style="rounded,filled" tooltip=e] 469 [label=<<TABLE border="0" cellspacing="0"><TR><TD border="0" colspan="2" href="./dispatcher-d285430b78fe54cf6cd61144dd6416605bd06d65/func.html">func</TD></TR></TABLE>> fillcolor=springgreen shape=box tooltip=func] 465 -> 469 466 -> 469 464 -> 469 469 -> 468 467 -> 469 }

digraph dmap { graph [ratio=1] node [style=filled] label = <dmap> splines = ortho style = filled 475 [label=<<TABLE border="0" cellspacing="0"><TR><TD border="0" colspan="2">a</TD></TR></TABLE>> fillcolor=cyan shape=box style="rounded,filled" tooltip=a] 476 [label=<<TABLE border="0" cellspacing="0"><TR><TD border="0" colspan="2">b</TD></TR></TABLE>> fillcolor=cyan shape=box style="rounded,filled" tooltip=b] 477 [label=<<TABLE border="0" cellspacing="0"><TR><TD border="0" colspan="2">c</TD></TR></TABLE>> fillcolor=cyan shape=box style="rounded,filled" tooltip=c] 478 [label=<<TABLE border="0" cellspacing="0"><TR><TD border="0" colspan="2">d</TD></TR><TR><TD align="RIGHT" border="1">default</TD><TD align="LEFT" border="1">0</TD></TR></TABLE>> fillcolor=cyan shape=box style="rounded,filled" tooltip=d] 479 [label=<<TABLE border="0" cellspacing="0"><TR><TD border="0" colspan="2">e</TD></TR></TABLE>> fillcolor=cyan shape=box style="rounded,filled" tooltip=e] 480 [label=<<TABLE border="0" cellspacing="0"><TR><TD border="0" colspan="2" href="./dispatcher-f489b07c9097460d67a8c010c7b8984eddbdf3bf/func.html">func</TD></TR></TABLE>> fillcolor=springgreen shape=box tooltip=func] 476 -> 480 477 -> 480 475 -> 480 480 -> 479 478 -> 480 }