From: mohammed chamma Date: Wed, 30 Dec 2020 23:39:56 +0000 (-0500) Subject: use id as hash since its an integer X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7e86cbabe881e7db4087625a7f6b1ec1543972ed;p=tweepy.git use id as hash since its an integer Co-authored-by: Harmon --- diff --git a/tweepy/models.py b/tweepy/models.py index aceb398..ac0de53 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -227,7 +227,7 @@ class User(Model): def __hash__(self): if hasattr(self, 'id'): - return hash(self.id) + return self.id else: raise TypeError('unhashable type: {} (no id attribute)'.format(type(self)))