From cfed98f896a899175ec6b80aabc690754d251c09 Mon Sep 17 00:00:00 2001 From: kjwon15 Date: Sat, 11 Oct 2014 00:19:03 +0900 Subject: [PATCH] Comparison between Status object --- tweepy/models.py | 6 ++++++ 1 file changed, 6 insertions(+) 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): -- 2.25.1