Skip to content

Add functools.cached_property #3439

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

Merged
merged 2 commits into from
Nov 6, 2019
Merged

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Nov 5, 2019

Part of #3319

@bluetech
Copy link
Contributor

bluetech commented Nov 5, 2019

Would it be correct to change the Anys to Type[_S]?

@srittau
Copy link
Collaborator Author

srittau commented Nov 5, 2019

It wouldn't be incorrect, but I decided against it, because the implementation just ignores those arguments.

@bluetech
Copy link
Contributor

bluetech commented Nov 5, 2019

I think it will be better to have the correct type. Even though the implementation currently ignores the argument, I still would want the type-checker to error out if the wrong type is passed to the argument.

Either way, LGTM.

@bluetech
Copy link
Contributor

bluetech commented Nov 5, 2019

Oh, and I forgot to say thanks!

@JelleZijlstra JelleZijlstra merged commit add0b5e into python:master Nov 6, 2019
@srittau srittau deleted the cached_property branch November 6, 2019 17:31
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.

3 participants