comparison Python/sysmodule.c @ 40799:04f5cbc74424

Kill off softspace completely (except in formatter.py which seems to have a different feature with the same name). The change to test_doctest.txt reduces the doctest failures to 3.
author Guido van Rossum <guido@python.org>
date Fri, 09 Feb 2007 23:20:19 +0000
parents e9a6234b26af
children f29f1a8b7869
comparison
equal deleted inserted replaced
40798:72277e1967b2 40799:04f5cbc74424
102 Py_INCREF(Py_None); 102 Py_INCREF(Py_None);
103 return Py_None; 103 return Py_None;
104 } 104 }
105 if (PyObject_SetAttrString(builtins, "_", Py_None) != 0) 105 if (PyObject_SetAttrString(builtins, "_", Py_None) != 0)
106 return NULL; 106 return NULL;
107 if (Py_FlushLine() != 0)
108 return NULL;
109 outf = PySys_GetObject("stdout"); 107 outf = PySys_GetObject("stdout");
110 if (outf == NULL) { 108 if (outf == NULL) {
111 PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); 109 PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
112 return NULL; 110 return NULL;
113 } 111 }
114 if (PyFile_WriteObject(o, outf, 0) != 0) 112 if (PyFile_WriteObject(o, outf, 0) != 0)
115 return NULL; 113 return NULL;
116 PyFile_SoftSpace(outf, 1); 114 if (PyFile_WriteString("\n", outf) != 0)
117 if (Py_FlushLine() != 0)
118 return NULL; 115 return NULL;
119 if (PyObject_SetAttrString(builtins, "_", o) != 0) 116 if (PyObject_SetAttrString(builtins, "_", o) != 0)
120 return NULL; 117 return NULL;
121 Py_INCREF(Py_None); 118 Py_INCREF(Py_None);
122 return Py_None; 119 return Py_None;