From 6eb7ce2ca79adb5635f958f9c27d319c851212aa Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 30 Aug 2017 11:03:02 -0700 Subject: db/message: Use self._id instead of self.get_message_id() The latter function returns self._id anyway, and this avoids a function call when sorting. --- alot/db/message.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'alot') diff --git a/alot/db/message.py b/alot/db/message.py index f8dcb74f..d07bd283 100644 --- a/alot/db/message.py +++ b/alot/db/message.py @@ -66,17 +66,17 @@ class Message(object): def __eq__(self, other): if isinstance(other, type(self)): - return self.get_message_id() == other.get_message_id() + return self._id == other.get_message_id() return NotImplemented def __ne__(self, other): if isinstance(other, type(self)): - return self.get_message_id() != other.get_message_id() + return self._id != other.get_message_id() return NotImplemented def __lt__(self, other): if isinstance(other, type(self)): - return self.get_message_id() < other.get_message_id() + return self._id < other.get_message_id() return NotImplemented def get_email(self): -- cgit v1.2.3