[issue45944] Avoid calling isatty() for most open() calls

Serhiy Storchaka report at bugs.python.org
Wed Dec 1 04:22:53 EST 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

What if change FileIO.isatty() instead? If make it returning False without invoking a system call if the file size is non-zero it will eliminate the need to expose _size.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45944>
_______________________________________


More information about the Python-bugs-list mailing list