I think something like this is a good idea, and that attaching a repr of an object as text content is a sensible default.
Would probably prefer expressing this with an alternative parameter or a different function name, e.g.
self.addDetail("return_value", None, return_value)
(can't think of a good keyword arg name right now). Or:
self.attachObject("return_value", return_value)
Am not overly enamoured of that name either.
I think something like this is a good idea, and that attaching a repr of an object as text content is a sensible default.
Would probably prefer expressing this with an alternative parameter or a different function name, e.g.
self. addDetail( "return_ value", None, return_value)
(can't think of a good keyword arg name right now). Or:
self. attachObject( "return_ value", return_value)
Am not overly enamoured of that name either.