callchain 0.2.6
Lets arbitrary callables, components, and event listeners be stringed into one lazily evaluated processing chain.
Some highly contrived examples:
chain style:
>>> from callchain import aachainq as chainq
>>> chainqueue = chainq()
>>> chainqueue(('a', 1), ('b', 2), ('c', 3)).reup().wrap(dict).map().value()
{'a': 1, 'b': 2, 'c': 3}
Object-oriented style:
>>> chainqueue(('a', 1), ('b', 2), ('c', 3))
>>> chainqueue.reup()
>>> chainqueue.wrap(dict)
>>> chainqueue.map()
>>> chainqueue.value()
{'a': 1, 'b': 2, 'c': 3}
Mirrored at https://github.com/lcrees/callchain/
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.