
May 30, 2016
4:06 a.m.
On Sat, 28 May 2016 20:19:27 +0200 Sebastian Berg <sebastian@sipsolutions.net> wrote:
The complexity addition is a bit annoying I must admit, on python 3 functools.lru_cache could be another option, but only there.
You can backport the pure Python version of lru_cache for Python 2 (or vendor the backport done here: https://pypi.python.org/pypi/backports.functools_lru_cache/). The advantage is that lru_cache is C-accelerated in Python 3.5 and upwards... Regards Antoine.