[issue30228] Open a file in text mode requires too many syscalls
STINNER Victor
report at bugs.python.org
Wed May 3 06:32:43 EDT 2017
STINNER Victor added the comment:
> You could call buffer.seek(0, SEEK_CUR) rather than buffer.tell() for avoiding a system call for readable stream. But this looks as a shamanism too.
Note: Buffered.seek(0, SEEK_CUR) only has a fast-path for readable file: it cannot be used to optimize open(filename, "w") (BufferedWriter.seek() isn't optimized).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30228>
_______________________________________
More information about the Python-bugs-list
mailing list