For debugging PL/Python functions, I'm often tempted to write something
like
rv = plpy.execute(...)
plpy.info(rv)
which prints something unhelpful like
<PLyResult object at 0xb461d8d8>
By implementing a "str" handler for the result object, it now prints
something like
<PLyResult status=5 nrows=2 rows=[{'foo': 1, 'bar': '11'}, {'foo': 2, 'bar': '22'}]>
Patch attached for review.