-
Notifications
You must be signed in to change notification settings - Fork 283
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
Iris cubes and coordinates are both mutable and hashable #962
Comments
👍 |
Got done in #1772 I believe. |
It's still an issue. For both Cubes and Coords, |
In order to maintain a backlog of relevant issues, we automatically label them as stale after 500 days of inactivity. If this issue is still important to you, then please comment on this issue and the stale label will be removed. Otherwise this issue will be automatically closed in 28 days time. |
This stale issue has been automatically closed due to a lack of community activity. If you still care about this issue, then please either:
|
This break Python conventions and thus is likely to lead to unexpected behavior.
This is especially problematic because these objects also implement their own
__eq__
method, and thus hashes for equal objects are not necessary equal.For an overview, read the answers on this StackOverflow question:
http://stackoverflow.com/questions/2671376/hashable-immutable
Since it's unlikely that cubes or coords can be made entirely immutable, my suggested fix is to add
__hash__ = None
to bothCoord
andCube
.The text was updated successfully, but these errors were encountered: