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
Sorry for the late answer, I somehow missed this issue.
Thank you for the feedback. I'm not sure about this one. Most python objects are hashable by default, including mutable ones.
a=object()
a.x=2# a is mutablehash(a) # Works
Is this an issue in practice ? Was there a failure you encounter because of this ? Otherwise I'll be in favour of keeping the default. It is sometimes convenient to use the default identity based hash, though I understand in this specific case, this could be confusing.
I think the general consensus in Python is that mutable types should not be hashable; however unfrozen dataclasses are hashable. See code below:
ps. edc is really handy
The text was updated successfully, but these errors were encountered: