A python library for memoizing functions for quick debugging/translations
Project description
MemoFN
A python library for memoizing functions for quick debugging/translations.
Usage
from memofn import memofn, load_cache, save_cache
def fib(n):
if n < 2:
return n
return fib(n-1) + fib(n-2)
load_cache('fib.cache.pkl')
mfib = memofn(expire_in_days=9)(fib)
mfib(10)
save_cache('fib.cache.pkl')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
memofn-0.1.0.tar.gz
(3.8 kB
view hashes)
Built Distribution
memofn-0.1.0-py3-none-any.whl
(4.3 kB
view hashes)