8.2.8.21.34. __dict__
-
SubDispatch.__dict__ = mappingproxy({'__module__': 'schedula.utils.dsp', '__doc__': "\n It dispatches a given :class:`~schedula.dispatcher.Dispatcher` like a\n function.\n\n This function takes a sequence of dictionaries as input that will be\n combined before the dispatching.\n\n :return:\n A function that executes the dispatch of the given\n :class:`~schedula.dispatcher.Dispatcher`.\n :rtype: callable\n\n .. seealso:: :func:`~schedula.dispatcher.Dispatcher.dispatch`,\n :func:`combine_dicts`\n\n Example:\n\n .. dispatcher:: dsp\n :opt: graph_attr={'ratio': '1'}, depth=-1\n :code:\n\n >>> from schedula import Dispatcher\n >>> sub_dsp = Dispatcher(name='Sub-dispatcher')\n ...\n >>> def fun(a):\n ... return a + 1, a - 1\n ...\n >>> sub_dsp.add_function('fun', fun, ['a'], ['b', 'c'])\n 'fun'\n >>> dispatch = SubDispatch(sub_dsp, ['a', 'b', 'c'], output_type='dict')\n >>> dsp = Dispatcher(name='Dispatcher')\n >>> dsp.add_function('Sub-dispatch', dispatch, ['d'], ['e'])\n 'Sub-dispatch'\n\n The Dispatcher output is:\n\n .. dispatcher:: o\n :opt: graph_attr={'ratio': '1'}, depth=-1\n :code:\n\n >>> o = dsp.dispatch(inputs={'d': {'a': 3}})\n\n while, the Sub-dispatch is:\n\n .. dispatcher:: sol\n :opt: graph_attr={'ratio': '1'}, depth=-1\n :code:\n\n >>> sol = o.workflow.nodes['Sub-dispatch']['solution']\n >>> sol\n Solution({'a': 3, 'b': 4, 'c': 2})\n >>> sol == o['e']\n True\n\n ", '__new__': <staticmethod(<function SubDispatch.__new__>)>, '__getstate__': <function SubDispatch.__getstate__>, '__setstate__': <function SubDispatch.__setstate__>, '__init__': <function SubDispatch.__init__>, 'blue': <function SubDispatch.blue>, '__call__': <function SubDispatch.__call__>, '_return': <function SubDispatch._return>, 'copy': <function SubDispatch.copy>, '__annotations__': {}})