From: Michael W. Hudson Date: Mon, 2 Aug 2004 13:21:09 +0000 (+0000) Subject: for some reason, the lack of adherence to Python's C whitespace rules X-Git-Tag: v2.4a2~67 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52db519faa6b0d4f611c81b4a8b181dfb988c678;p=python for some reason, the lack of adherence to Python's C whitespace rules must have annoyed me at some point. --- diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index b76f3739fa..8ff733c4d8 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1588,7 +1588,7 @@ builtin_raw_input(PyObject *self, PyObject *args) if (PyFile_WriteString(" ", fout) != 0) return NULL; } - if (PyFile_Check (fin) && PyFile_Check (fout) + if (PyFile_Check(fin) && PyFile_Check(fout) && isatty(fileno(PyFile_AsFile(fin))) && isatty(fileno(PyFile_AsFile(fout)))) { PyObject *po; @@ -1607,7 +1607,7 @@ builtin_raw_input(PyObject *self, PyObject *args) po = NULL; prompt = ""; } - s = PyOS_Readline(PyFile_AsFile (fin), PyFile_AsFile (fout), + s = PyOS_Readline(PyFile_AsFile(fin), PyFile_AsFile(fout), prompt); Py_XDECREF(po); if (s == NULL) {