summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCasey Dahlin <cdahlin@redhat.com>2008-12-23 11:50:13 -0500
committerCasey Dahlin <cdahlin@redhat.com>2008-12-23 11:50:13 -0500
commit5be1c06227d163d5f22f7cb46670b9772ae0f9cf (patch)
treecefd6bb5cfd7f86a68d05dec590bba25a57e1376
parent7f674052581e4749ae397b67c787ed62bc5692a5 (diff)
downloadupstate-5be1c06227d163d5f22f7cb46670b9772ae0f9cf.tar.gz
upstate-5be1c06227d163d5f22f7cb46670b9772ae0f9cf.tar.xz
upstate-5be1c06227d163d5f22f7cb46670b9772ae0f9cf.zip
Add subset_of() method
-rw-r--r--category.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/category.py b/category.py
index b67669e..c718002 100644
--- a/category.py
+++ b/category.py
@@ -99,6 +99,9 @@ class Category:
return False
return self.name == other.name and self.argstup() == other.argstup()
+ def subset_of(self, other):
+ return self.intersect(other) == self
+
def argstup(self):
"""
Returns arguments as a sorted tuple.