How to write lazy functions which are chainable, in python?

Posted by roopesh on Stack Overflow See other posts from Stack Overflow or by roopesh
Published on 2010-06-16T02:43:54Z Indexed on 2010/06/16 2:52 UTC
Read the original article Hit count: 266

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about python

Related posts about lazy