From: mohammed chamma Date: Thu, 31 Dec 2020 03:12:24 +0000 (-0500) Subject: hash == id X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1af7de3a9f7aef5e05111914c4d70c0e4a5b08ac;p=tweepy.git hash == id Co-authored-by: Harmon --- diff --git a/tweepy/models.py b/tweepy/models.py index a7a5c6d..f290594 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -212,10 +212,7 @@ class User(Model): return NotImplemented def __hash__(self): - if hasattr(self, 'id'): - return self.id - else: - raise TypeError('unhashable type: {} (no id attribute)'.format(type(self))) + return self.id class DirectMessage(Model):