Comparison between Status object
authorkjwon15 <kjwonmail@gmail.com>
Fri, 10 Oct 2014 15:19:03 +0000 (00:19 +0900)
committerkjwon15 <kjwonmail@gmail.com>
Fri, 10 Oct 2014 15:19:03 +0000 (00:19 +0900)
tweepy/models.py

index 2a84b269cdd93e52000f9a7dc13e1cdac34b9f8b..0ce419e2ebee355d9a55f67d46d22158a644c2df 100644 (file)
@@ -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):