Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cache_clear to lru_cache #1941

Merged
merged 1 commit into from Mar 6, 2018
Merged

Conversation

ethanhs
Copy link
Contributor

@ethanhs ethanhs commented Mar 5, 2018

This will end up being used in mypy once we move some module search caching to lru_cache.

@eric-wieser
Copy link
Contributor

eric-wieser commented Mar 5, 2018

Want to add cache_info too? edit: nevermind

@ethanhs
Copy link
Contributor Author

ethanhs commented Mar 5, 2018

Want to add cache_info too?

It is on the line above.

@eric-wieser
Copy link
Contributor

Yep, I now see that!

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed.

@eric-wieser
Copy link
Contributor

eric-wieser commented Mar 5, 2018

Regarding using it in mypy core - it's unfortunate that @lru_cache throws away the types of the arguments of the function it wraps (waiting on python/typing#193?)

@gvanrossum
Copy link
Member

Maybe you meant a different issue?

@ethanhs
Copy link
Contributor Author

ethanhs commented Mar 5, 2018

@eric-wieser what about typed=[True|False]? Or are you thinking of something else?

@eric-wieser
Copy link
Contributor

Good catch: wrong project, right number

@JelleZijlstra JelleZijlstra merged commit 1c47458 into python:master Mar 6, 2018
yedpodtrzitko pushed a commit to yedpodtrzitko/typeshed that referenced this pull request Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants