This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: some int results that should be bool
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: gvanrossum, tzot
Priority: low Keywords:

Created on 2002-08-29 09:53 by tzot, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (2)
msg12191 - (view) Author: Χρήστος Γεωργίου (Christos Georgiou) (tzot) * Date: 2002-08-29 09:53
Posting this as a SF bug since the relevant patch would 
be very small.  (I can post it as a patch if requested, 
though).

1.
cStringIO.c, line 136, IO_isatty returns PyInt_FromLong
(0), while this should be PyBool_FromLong(0).
StringIO.isatty returns False --which is <type bool>-- 
and so should cStringIO.

Note: documentation states that file-like objects not 
being real files should not define this method.  Perhaps 
it should be removed from cStringIO and StringIO.

2.
posixmodule.c, line 759, posix_access returns 
PyInt_FromLong.  It should be PyBool_FromLong.

3. (rather indifferent, this one)
svmodule.c, line 393, sv_IsVideoDisplayed should return 
a bool also.
msg12192 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-09-01 15:07
Logged In: YES 
user_id=6380

Thanks! I've fixed 1 and 2. I don't think 3 is worth fixing.
I think removing the isatty() method serves no purpose
except possibly breaking existing code; maybe the docs could
be updated, but I don't care enough.

BTW, please don't assign bugs to developers. We'll do that
on triage. Ditto for the priority.
History
Date User Action Args
2022-04-10 16:05:37adminsetgithub: 37103
2002-08-29 09:53:50tzotcreate