Permalink
Browse files

Add an __eq__ method for the Tag object allowing object comparisons, …

…especially within TagSet objects
  • Loading branch information...
1 parent f545e10 commit 3281441d644fa4f889dbe06c2a77e5f4ae644557 @staer staer committed with jamesls Sep 20, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 boto/s3/tagging.py
View
@@ -20,6 +20,9 @@ def to_xml(self):
return '<Tag><Key>%s</Key><Value>%s</Value></Tag>' % (
self.key, self.value)
+ def __eq__(self, other):
+ return (self.key == other.key and self.value == other.value)
+
class TagSet(list):
def startElement(self, name, attrs, connection):

0 comments on commit 3281441

Please sign in to comment.