kachayev/fn.py

Required `memoise` function

signalpillar opened this issue · 6 comments

I haven't found memoise function implementation. I suggest to have at least two implementations with weakref and regular dictionary.

Does "I suggest" mean that you are not going to implement it as PR?

Hm, I will try to make my version and then PR. Thanks

Just one question, if you are going to start implementation, how will it differ from http://docs.python.org/3.4/library/functools.html#functools.lru_cache ?

thank you for pointing me this function. it appears in 3.2 only, while we need something similar in 2.7. also I think there must be something built on top of weakrefs. Btw, the signature of function is very interesting, I even haven't thought about maxsize and typed

Ok, looking forward!

I have found that there is backport http://code.activestate.com/recipes/578078-py26-and-py30-backport-of-python-33s-lru-cache/ of 3.2 implementation. What do you think about it ?