8000 added a hash to resources to prepare (req for py3) · zacharyvoase/twilio-python@9cb6f02 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9cb6f02

Browse files
committed
added a hash to resources to prepare (req for py3)
1 parent 5569775 commit 9cb6f02

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

twilio/rest/resources/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ def __eq__(self, other):
102102
return (isinstance(other, self.__class__)
103103
and self.__dict__ == other.__dict__)
104104

105+
def __hash__(self):
106+
return hash(frozenset(self.__dict__))
107+
105108
def __ne__(self, other):
106109
return not self.__eq__(other)
107110

0 commit comments

Comments
 (0)
0