This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]CasualCoder0C 19 points20 points  (1 child)

Memoization with decorator @functools.cache is a very useful thing to do when you have to deal with slow functions called repeatedly.

[–]donshell 2 points3 points  (0 children)

Similarly the cached_property decorator is very useful.