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
CPython is automatically fixing __hash__ that returns -1 to -2 because -1 is a special value for indicating error. It is a implementation specific thing that I don't think numba needs to follow.
Users should treat numba as a different python implementation that lives within the Python interpreter, such that implementation details can be different. Numba does not need to guarantee the hash() function for various types matches the implementation of CPython. In fact, the hashing algorithm in CPython can be different in each version.
As the '-1' hash value is reserved in python, hash(-1) == -2. But in numba hash(-1) == -1.
A small difference, but could lead to weird bugs.
The text was updated successfully, but these errors were encountered: