How to write lazy functions which are chainable, in python?
- by roopesh
I want to write functions which are lazy as well as chainable. What would be the best way.
I know that one way would be to do yield instead of return.
I want these functions to be lazy in the way similar to how sqlalchemy functions are lazy when asked to fetch the data from DB.