X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Fmessage.py;h=955382dac211f0b44aba3bbe62b8a04eae1da632;hb=4a6642a2a1e2d15f71fff6b6a0b4bbb0296e2bdb;hp=bf0c4da488a0d240066dfcde2a5ce799a21042eb;hpb=26d52cf6cf4573fa2ef41b6150f5686bc91ea785;p=notmuch diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py index bf0c4da4..955382da 100644 --- a/bindings/python/notmuch/message.py +++ b/bindings/python/notmuch/message.py @@ -21,7 +21,8 @@ Copyright 2010 Sebastian Spaeth ' from ctypes import c_char_p, c_long, c_uint, c_int from datetime import date -from notmuch.globals import (nmlib, STATUS, NotmuchError, Enum, _str, +from notmuch.globals import ( + nmlib, STATUS, NotmuchError, Enum, _str, Python3StringMixIn, NotmuchTagsP, NotmuchMessagesP, NotmuchMessageP, NotmuchFilenamesP) from notmuch.tag import Tags from notmuch.filename import Filenames @@ -239,7 +240,7 @@ class Messages(object): sys.stdout.write(set_end) -class Message(object): +class Message(Python3StringMixIn): """Represents a single Email message Technically, this wraps the underlying *notmuch_message_t* @@ -796,9 +797,6 @@ class Message(object): """Represent a Message() object by str()""" return self.__str__() - def __str__(self): - return unicode(self).encode('utf-8') - def __unicode__(self): format = "%s (%s) (%s)" return format % (self.get_header('from'),