<br>I hadn't noticed this macro defined in Include/object.h before:<br><br clear="all">/* Helper for passing objects to printf and the like */<br>#define PyObject_REPR(obj) PyString_AS_STRING(PyObject_Repr(obj))<br><br>I may not be right, but I don't see how this can't help but not free the intermediate PyString object. It doesn't seem to be used, except for in situations where Python is not going to continue working much longer anyway (specifically, in 
compile.c and ceval.c.) I could not be right about *that*, too, though ;-) It strikes me that it should not be used, or maybe renamed to _PyObject_REPR. It's wasn't added in 2.5 or 2.4, though, so it's not particularly new and I can't guarantee that it's not used in any third party code. But, then again, anyone using it isn't free of leaks. Should removing or renaming it be done in 
2.5 or in Py3K?<br><br>Triple-negative'ly y'rs,<br>-- <br>Thomas Wouters &lt;<a href="mailto:thomas@python.org">thomas@python.org</a>&gt;<br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!