If you're doing same long-running or memory hogging operations often, functools.cache helps you write more performant code by storing the results and accessing them from memory.
https://hamatti.org/posts/memoize-with-functools-cache/
Mastodon is the best way to keep up with what's happening.
Follow anyone across the fediverse and see it all in chronological order. No algorithms, ads, or clickbait in sight.