From fda223ee46f5a105036b9d35c86a521c2cfdeb1b Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 17 Sep 2018 21:49:32 +0100 Subject: [PATCH] Implement __str__ and __repr__ on Utils.IRCHostmask --- Utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Utils.py b/Utils.py index 7c87e495..b9a442dc 100644 --- a/Utils.py +++ b/Utils.py @@ -45,6 +45,11 @@ class IRCHostmask(object): self.username = username self.hostname = hostname self.hostmask = hostmask + def __repr__(self): + return "Utils.IRCHostmask(%s)" % self.__str__() + def __str__(self): + return self.hostmask + def seperate_hostmask(hostmask): hostmask = remove_colon(hostmask) first_delim = hostmask.find("!")