From b5ff903d6494fee1258103a4575b163d2f7ecd00 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sun, 25 Oct 2015 13:00:40 +0100 Subject: [PATCH] [TASK] Beautify representation for base Message class. --- irc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/irc.py b/irc.py index 711e547..c3e5e5b 100644 --- a/irc.py +++ b/irc.py @@ -65,6 +65,9 @@ class Message(object): def __repr__(self): items = self.__dict__.copy() + if len(items) == 1: + items = items["data"] + for e in ["prefix", "nick", "host", "ident"]: del items[e] e = [] for key in items: if key == "data":