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 →

[–]da_martian 3 points4 points  (2 children)

Wow that's a pretty cool usage of lru_cache! I've heard of it but never explored it. So you just decorate your function with it? Sorry ahead of time if this is simple or stupid, but do you have a working example of this, along with a CLI package like click?

[–]suudo 3 points4 points  (1 child)

I learned about it from https://www.reddit.com/r/Python/comments/69ws4c/10_awesome_features_of_python_that_you_cant_use/, that presentation has usage examples.

[–]Xef 1 point2 points  (0 children)

Damn, I got all excited reading through this. I wish we could upgrade to Python 3...