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
- Host: GitHub
- URL: https://github.com/michaelb/memoization-python
- Owner: michaelb
- Created: 2021-01-13T12:34:29.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-25T08:34:52.000Z (over 4 years ago)
- Last Synced: 2025-03-02T04:38:41.529Z (4 months ago)
- Language: Python
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.