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
The class apitools.base.protorpclite.messages.Message is an unhashable type in Python 3 and as a result, raises a TypeError when used as a key in a dict.
The class
apitools.base.protorpclite.messages.Message
is an unhashable type in Python 3 and as a result, raises a TypeError when used as a key in a dict.The reason for this is that in Python 3.x "a class that overrides
__eq__()
and does not define__hash__()
will have its__hash__()
implicitly set to None" (https://docs.python.org/3.6/reference/datamodel.html#object.__hash__). This makes it unhashable.In Python 2, since
__eq__()
was defined, it simply inherited the__hash__()
from object. In Python 3 it doesn't.The text was updated successfully, but these errors were encountered: