From 90b4a48d857dae4346608df9b674bbde2e6ed5fe Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 19 Feb 2010 00:03:32 -0500 Subject: Rework InstanceProxy.__repr__ to render the attrdict as keyword args, rather than a dict --- libpython.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libpython.py b/libpython.py index c045fa9..e353379 100644 --- a/libpython.py +++ b/libpython.py @@ -286,7 +286,8 @@ class PyInstanceObjectPtr(PyObjectPtr): self.address = address def __repr__(self): - return '<%s(%s) at remote 0x%x>' % (self.cl_name, self.attrdict, self.address) + kwargs = ', '.join(["%s=%r"%(arg, val) for arg, val in self.attrdict.iteritems()]) + return '<%s(%s) at remote 0x%x>' % (self.cl_name, kwargs, self.address) # Get name of class: in_class = PyObjectPtr.from_pyobject_ptr(self.field('in_class')) -- cgit