X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=bindings%2Fpython-cffi%2Fnotmuch2%2F_tags.py;h=3b14c981a4d9a09ed60430309184c0dae910a3b0;hb=2d895a0119b423b117d10e890c9e0eb5d2a9cdf8;hp=fe422a7944882d568eeaf81e2a3b7f8099db2bf9;hpb=e2df30f7a98f91543d0b3561dbb366eb4b3d812c;p=notmuch diff --git a/bindings/python-cffi/notmuch2/_tags.py b/bindings/python-cffi/notmuch2/_tags.py index fe422a79..3b14c981 100644 --- a/bindings/python-cffi/notmuch2/_tags.py +++ b/bindings/python-cffi/notmuch2/_tags.py @@ -110,6 +110,27 @@ class ImmutableTagSet(base.NotmuchObject, collections.abc.Set): def __eq__(self, other): return tuple(sorted(self.iter())) == tuple(sorted(other.iter())) + def issubset(self, other): + return self <= other + + def issuperset(self, other): + return self >= other + + def union(self, other): + return self | other + + def intersection(self, other): + return self & other + + def difference(self, other): + return self - other + + def symmetric_difference(self, other): + return self ^ other + + def copy(self): + return set(self) + def __hash__(self): return hash(tuple(self.iter())) @@ -277,7 +298,7 @@ class TagsIter(base.NotmuchObject, collections.abc.Iterator): :param errors: If using a codec, this is the error handler. See :func:`str.decode` to which this is passed on. - :raises ObjectDestoryedError: if used after destroyed. + :raises ObjectDestroyedError: if used after destroyed. """ _tags_p = base.MemoryPointer()