Use __repr__ if there is no possibility message defined.

parent 5abe4f72
...@@ -15,8 +15,7 @@ class Possibility(object): ...@@ -15,8 +15,7 @@ class Possibility(object):
if self.handler in MESSAGES: if self.handler in MESSAGES:
return MESSAGES[self.handler].format(self.root, *self.args) return MESSAGES[self.handler].format(self.root, *self.args)
return '<Possibility root="%s" handler=%s args=%s>' \ return self.__repr__()
% (self.root, self.handler.func_name, self.args)
def __repr__(self): def __repr__(self):
return '<Possibility root="%s" handler=%s args=%s>' \ return '<Possibility root="%s" handler=%s args=%s>' \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment