You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Builtins are incorrectly hinted as unhashable #10424
I believe this was partially introduced by #8465. I ran into this issue while looking into microsoft/pyright#5446.
According to the python docs, a type that redefines __eq__ but not __hash__ is unhashable.
In the current typeshed hints, many types explicitly define __eq__ (int for example) but do not define hash. A type checker could incorrectly assume that the type is unhashable because of this.
Activity
Revert "Remove un-needed `__hash__` methods from `stdlib` (#8465)" (#…