From b84d133500e88aa867647f3866515daf2e545de0 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 1 Jun 2019 22:28:37 +0100 Subject: add __str__ and __repr__ defs to IRCLine.ParsedLine --- src/IRCLine.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/IRCLine.py b/src/IRCLine.py index 538c0a5e..9a545479 100644 --- a/src/IRCLine.py +++ b/src/IRCLine.py @@ -47,6 +47,11 @@ class ParsedLine(object): self.prefix = prefix self.tags = {} if tags == None else tags + def __repr__(self): + return "ParsedLine(%s)" % self.__str__() + def __str__(self): + return self.format() + def _tag_str(self, tags: typing.Dict[str, str]) -> str: tag_pieces = [] for tag, value in tags.items(): -- cgit v1.3.1-10-gc9f91