From: kjwon15 Date: Fri, 10 Oct 2014 15:19:03 +0000 (+0900) Subject: Comparison between Status object X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=cfed98f896a899175ec6b80aabc690754d251c09;p=tweepy.git Comparison between Status object --- diff --git a/tweepy/models.py b/tweepy/models.py index 2a84b26..0ce419e 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -112,6 +112,12 @@ class Status(Model): def favorite(self): return self._api.create_favorite(self.id) + def __eq__(self, other): + if isinstance(other, Status): + return self.id == other.id + + return NotImplemented + class User(Model):