From: Guido van Rossum Date: Sun, 7 Apr 2002 06:28:00 +0000 (+0000) Subject: isatty() should return a bool. X-Git-Tag: v2.3c1~6099 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f7666ff437c4acb267823d3b37ba3248afe4623;p=python isatty() should return a bool. --- diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 3e0b85e7d7..a752a20ea5 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -565,7 +565,7 @@ file_isatty(PyFileObject *f) Py_BEGIN_ALLOW_THREADS res = isatty((int)fileno(f->f_fp)); Py_END_ALLOW_THREADS - return PyInt_FromLong(res); + return PyBool_FromLong(res); }