3 ms·
>It gave me a few tips, but there was one thing I didn't understand: It said "Adding caching to functions". Though I knew what caching is, I'd never heard anyon
by coldtea 3y ago
>It gave me a few tips, but there was one thing I didn't understand: It said "Adding caching to functions". Though I knew what caching is, I'd never heard anyone do it to Python functions
Not related to the Gemini issue, but what it describes as "adding caching to functions" is what is regularly called "memoization". Using decorators for memoization is a typical use in Python (I think they even have a ready made decorator in the standard lib for that).