def failure_code(sub):
 return ('{\n        %(failure_var)s = %(id)s;\n        if (!PyErr_Occurred()) {\n            PyErr_SetString(PyExc_RuntimeError,\n                "Unexpected error in an Op\'s C code. "\n                "No Python exception was set.");\n            }\n        goto __label_%(id)i;}' % sub)

def failure_code ( sub ) : return ( '{\n        %(failure_var)s = %(id)s;\n        if (!PyErr_Occurred()) {\n            PyErr_SetString(PyExc_RuntimeError,\n                "Unexpected error in an Op\'s C code. "\n                "No Python exception was set.");\n            }\n        goto __label_%(id)i;}' % sub )
code contained in sub[fail] .