Use __repr__ if there is no possibility message defined.

parent 5abe4f72
......@@ -15,8 +15,7 @@ class Possibility(object):
if self.handler in MESSAGES:
return MESSAGES[self.handler].format(self.root, *self.args)
return '<Possibility root="%s" handler=%s args=%s>' \
% (self.root, self.handler.func_name, self.args)
return self.__repr__()
def __repr__(self):
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