From b0a2d8488d53a0591011913af78a20ec982c5b48 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Fri, 12 Oct 2012 07:47:55 -0700 Subject: [PATCH] added repr method to ParamDescrs Signed-off-by: Leonardo de Moura --- python/z3.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/python/z3.py b/python/z3.py index 9d9d03e55..dea752a87 100644 --- a/python/z3.py +++ b/python/z3.py @@ -43,6 +43,7 @@ from z3types import * from z3consts import * from z3tactics import * from z3printer import * +import io # We use _z3_assert instead of the assert command because we want to # produce nice error messages in Z3Py at rise4fun.com @@ -4419,6 +4420,20 @@ class ParamDescrsRef: else: return self.get_kind(arg) + def __repr__(self): + r = io.StringIO() + first = True + r.write(u'(') + for i in range(self.size()): + if first: + first = False + else: + r.write(u' ') + r.write(u'%s' % self.get_name(i)) + r.write(u')') + return r.getvalue() + + ######################################### # # Goals