file.seek(file.tell()) needed: bad docs or a bug? #93079
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-IO
type-bug
An unexpected behavior, bug, or error
The following produces a file containing
b'hello\n '
, i.e.hello
followed by a newline and a space:But if I add
file.seek(file.tell())
, then it instead producesb'hell \n'
as I would expect:Is this correct behaviour? I can't find any mention of it in the docs. (I can't use
file.seek(4)
because that "produces undefined behaviour" according to docs.)The text was updated successfully, but these errors were encountered: