[docs] [issue26158] File truncate() not defaulting to current position as documented
report at bugs.python.org
Tue Jan 19 16:38:29 EST 2016
Martin Panter added the comment:
In theory, TextIOWrapper could rewrite the last bit of the file (or the whole file) to have the requested number of characters. But I wonder if it is worth it; maybe deprecation is better. Do you have a use case for any of these bugs, or are you just playing around to see what the methods do?
In Issue 12922, seek() and tell() were (re-)defined for TextIOBase, but the situation with truncate() was apparently not considered.
Perhaps the write()–read() bug is related to Issue 12215.
Python tracker <report at bugs.python.org>
More information about the docs