Method chaining with funcy.
Project description
funcy-chain
Method chaining with funcy.
>>> from funcy_chain import chain
>>> (
... chain([1, 2, 3, 7, 6, 5, 4])
... .without(3)
... .filter(lambda x: x > 2)
... .remove(lambda x: x > 6)
... .sort(reverse=True)
... ).value
[6, 5, 4]
Why?
funcy is great, but doesn't support method chaining. pydash is similar to funcy and does support chaining, but it is more complex and its chains are harder to debug. funcy-chain enables method chaining with built-in, stdlib and funcy functions, in a way that is simple and straightforward.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
funcy-chain-0.1.1.tar.gz
(10.1 kB
view hashes)
Built Distribution
Close
Hashes for funcy_chain-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ec7fb683f6db1c53b76d94103e8f1d691f612915ceb293d09ef10625292e957 |
|
MD5 | f59a35edebe677f0409bf0085d7f91f3 |
|
BLAKE2b-256 | b240df819d61ef86bdfe9422ba83d9af8e46e363519231c4663a28e37b464ecc |