Source

callchain /

Filename Size Date modified Message
callchain
docs
351 B
329 B
1.5 KB
133 B
635 B
1.3 KB
1.8 KB
192 B
27 B
1.6 KB
277 B

callchain strings arbitrary callables, components, and event listeners 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/kwarterthieves/callchain/