Zufu Liu <zufu...@163.com> added the comment:
Please also consider following pieces of code. They (value of int sub classes) can't be returned by fileno(). Python 3.8.0b1 (tags/v3.8.0b1:3b5deb0116, Jun 4 2019, 19:52:55) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> class MyInt(int):pass ... >>> a=MyInt(6) >>> a 6 >>> import os.path >>> os.path.isfile(a) False >>> os.path.isfile(True) False >>> os.path.isfile(False) False >>> ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37436> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com