4 ms·
I just use a simple chaining function for python like so https://sr.ht/~tpapastylianou/chain-ops-python/ https://sr.ht/~tpapastylianou/chain-ops-python/
by tpoacher 3y ago
I just use a simple chaining function for python like so https://sr.ht/~tpapastylianou/chain-ops-python/ https://sr.ht/~tpapastylianou/chain-ops-python/
- joeman1000 3y agoA neat solution, but you can’t alter the position of the argument per function.
- tpoacher 3y agoOf course you can. In fact I'm doing just that in two places in the example. (Yes I know what you mean, but yes you know what I mean!) In the end, chains are about readability and logical flow; even if you don't like pre-wrapping in more meaningfully named functionals like the example, and accept the slight readability cost of using the occasional in-spot lambda or partial, I feel that this still becomes a lot more readable than "treat this symbol unconventionally in this context as a positional placeholder" hacky syntax stuff.