summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2010-02-19 00:03:32 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2010-02-19 00:03:32 -0500
commit90b4a48d857dae4346608df9b674bbde2e6ed5fe (patch)
treeb6d3a3cb0f15025f50d95c40e20fe4db93f47bb4
parent29e5f5aa12775bdc6118b9459e2732ff1327e191 (diff)
downloadlibpython-90b4a48d857dae4346608df9b674bbde2e6ed5fe.tar.gz
libpython-90b4a48d857dae4346608df9b674bbde2e6ed5fe.tar.xz
libpython-90b4a48d857dae4346608df9b674bbde2e6ed5fe.zip
Rework InstanceProxy.__repr__ to render the attrdict as keyword args, rather than a dict
-rw-r--r--libpython.py3
1 files changed, 2 insertions, 1 deletions
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'))