On Linux, one sometimes sees spurious errors after interrupting
previous output.  Call clearerr() to prevent past errors affecting our
ferror() test later, in PyObject_Print().  Suggested by Marc Lemburg.
diff --git a/Objects/object.c b/Objects/object.c
index b62477a..ee9c271 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -168,6 +168,7 @@
 		return -1;
 	}
 #endif
+	clearerr(fp); /* Clear any previous error condition */
 	if (op == NULL) {
 		fprintf(fp, "<nil>");
 	}