X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Ftag.py;h=2fb7d3287a8413e295b1e9b5b2840d9d06bdb476;hb=ff58a06e83379f2b224861082b782bec538f0d2d;hp=f3a3d27e501dbfb5886ef4031f99490ff1a36968;hpb=3434d194026ff65217d9342ffe511f67fd71e79f;p=notmuch diff --git a/bindings/python/notmuch/tag.py b/bindings/python/notmuch/tag.py index f3a3d27e..2fb7d328 100644 --- a/bindings/python/notmuch/tag.py +++ b/bindings/python/notmuch/tag.py @@ -111,13 +111,17 @@ class Tags(object): return self._valid(self._tags) > 0 def __str__(self): - """The str() representation of Tags() is a space separated list of tags + return unicode(self).encode('utf-8') - .. note:: As this iterates over the tags, we will not be able - to iterate over them again (as in retrieve them)! If - the tags have been exhausted already, this will raise a - :exc:`NotmuchError` STATUS.NOT_INITIALIZED on - subsequent attempts. + def __unicode__(self): + """string representation of :class:`Tags`: a space separated list of tags + + .. note:: + + As this iterates over the tags, we will not be able to iterate over + them again (as in retrieve them)! If the tags have been exhausted + already, this will raise a :exc:`NotmuchError` + STATUS.NOT_INITIALIZED on subsequent attempts. """ return " ".join(self)