[docs] [issue26158] File truncate() not defaulting to current position as documented
report at bugs.python.org
Tue Jan 19 14:24:28 EST 2016
Fornax added the comment:
After taking a little time to let this sink in, I'm going to play Devil's Advocate just a little more.
It sounds like you're basically saying that any read-write text-based modes (e.g. r+, w+) should be used at your own peril. While I understand your UTF-7 counterexample, and it's a fair point, is it out of line to expect that for encodings that operate on full bytes, file positioning should work a bit more intuitively? (Which is to say, a write/truncate after a read should take place in the position immediately following the end of the read.)
Python tracker <report at bugs.python.org>
More information about the docs