def get_c_cleanup(r, name, sub):
 post = ('\n    {Py_XDECREF(py_%(name)s);}\n    ' % locals())
 return (r.type.c_cleanup(name, sub) + post)

def get_c_cleanup ( r , name , sub ) : post = ( '\n    {Py_XDECREF(py_%(name)s);}\n    ' % locals ( ) ) return ( r . type . c_cleanup ( name , sub ) + post )
wrapper around c_cleanup that decrefs py_name .