diff -r 48ffcedd66e3 Objects/object.c --- a/Objects/object.c Sun Jul 25 17:05:42 2010 +0200 +++ b/Objects/object.c Sun Jul 25 15:14:58 2010 -0700 @@ -258,15 +258,12 @@ return PyObject_INIT_VAR(op, tp, nitems); } -/* Implementation of PyObject_Print with recursion checking */ +/* Implementation of PyObject_Print */ static int -internal_print(PyObject *op, FILE *fp, int flags, int nesting) +internal_print(PyObject *op, FILE *fp, int flags) { int ret = 0; - if (nesting > 10) { - PyErr_SetString(PyExc_RuntimeError, "print recursion"); - return -1; - } + if (PyErr_CheckSignals()) return -1; #ifdef USE_STACKCHECK @@ -336,7 +333,7 @@ int PyObject_Print(PyObject *op, FILE *fp, int flags) { - return internal_print(op, fp, flags, 0); + return internal_print(op, fp, flags); } /* For debugging convenience. Set a breakpoint here and call it from your DLL */