An open API service indexing awesome lists of open source software.

https://github.com/michaelb/memoization-python

Use a python quirk to memoize functions easily
https://github.com/michaelb/memoization-python

Last synced: 4 months ago
JSON representation

Use a python quirk to memoize functions easily

Awesome Lists containing this project

README

        

Using a lesser-known python quirk, memoizing functions do not require using decorations, wrappers, etc...

Not saying #1 is the best solution, but possibly the simplest.

2, 3 & 3bis are increasingly complex ways to do memoization, but with features like the ability to memoize easily multiple functions, or deal with that without access to the source code, as well as 'traps' that the programmer should be aware of.