From 79e065a730dc8b1df93b99a200229813b892be46 Mon Sep 17 00:00:00 2001 From: Jacob Bom Date: Sun, 25 Sep 2016 16:31:06 +0200 Subject: [PATCH] Add __str__ and __repr__ to MergedFilter. --- telegram/ext/filters.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/telegram/ext/filters.py b/telegram/ext/filters.py index fabbe0870..d2672212a 100644 --- a/telegram/ext/filters.py +++ b/telegram/ext/filters.py @@ -69,6 +69,13 @@ class MergedFilter(BaseFilter): elif self.or_filter: return self.base_filter(message) or self.or_filter(message) + def __str__(self): + return ("").format(self.base_filter, "and" if self.and_filter else "or", + self.and_filter or self.or_filter) + + __repr__ = __str__ + class Filters(object): """