hyrious / chain

write python with chain dsl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chain.py

Put the chain.py file and chain.pyi (for auto completion) to your project.

from chain import chain, it
chain(range(10)).map(it * 2).filter(it > 3).to_list()

If you're a pythonic man, you dislike this library and write:

[t for i in range(10) if (t := i * 2) > 3]

Wow, so pythonic, but not me!

License

MIT @ hyrious

About

write python with chain dsl

License:MIT License


Languages

Language:Python 100.0%