-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[question] dictionary _KT typevar and hashability #3884
Comments
The |
Thanks for the info! |
Given that certain types are marked as non-hashable (#3219) wouldn't this have at least a fringe value? |
This was referenced Nov 5, 2021
MaxG87
added a commit
to MaxG87/collectiondict
that referenced
this issue
Mar 20, 2024
It would be best if `mypy` would directly reject unhashable types, but according to python/typeshed#3884 this is unfeasible. Therefore, a small tests is added to serve as marker and playground.
MaxG87
added a commit
to MaxG87/collectiondict
that referenced
this issue
Mar 20, 2024
It would be best if `mypy` would directly reject unhashable types, but according to python/typeshed#3884 this is unfeasible. Therefore, a small tests is added to serve as marker and playground.
MaxG87
added a commit
to MaxG87/collectiondict
that referenced
this issue
Mar 20, 2024
It would be best if `mypy` would directly reject unhashable types, but according to python/typeshed#3884 this is unfeasible. Therefore, a small tests is added to serve as marker and playground.
MaxG87
added a commit
to MaxG87/collectiondict
that referenced
this issue
Mar 20, 2024
It would be best if `mypy` would directly reject unhashable types, but according to python/typeshed#3884 this is unfeasible. Therefore, a small tests is added to serve as marker and playground.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear all,
I recently noticed that the
_KT
typevar used in annotatingdict
has no upperbound
specified, yet dictionary keys must (as far as I'm aware) always be hashable.Is there a reason here as to why
_KT
is not defined asTypeVar('_KT', bound=Hashable)
?Regards, Bas
The text was updated successfully, but these errors were encountered: