memoization library for python 2.7
问题 I see that python 3.2 has memoization as a decorator in functools library. http://docs.python.org/py3k/library/functools.html#functools.lru_cache Unfortunately it is not yet backported to 2.7. Is there any specific reason as why it is not available in 2.7? Is there any 3rd party library providing the same feature or should I write my own? 回答1: Is there any specific reason as why it is not available in 2.7? @Nirk has already provided the reason: unfortunately, the 2.x line only receive