[issue39962] Wrong file.tell() function results (Windows 10/Python 64 3.8.2/3.7 - no bug in PyPy3.6/Python2.7)

Eric V. Smith report at bugs.python.org
Fri Mar 13 20:02:31 EDT 2020


Eric V. Smith <eric at trueblade.com> added the comment:

tell() is opaque when opening a text file: you can't interpret the output, its only use is for input to seek().

>From the docs https://docs.python.org/3/tutorial/inputoutput.html#methods-of-file-objects:

"f.tell() returns an integer giving the file object’s current position in the file represented as number of bytes from the beginning of the file when in binary mode and an opaque number when in text mode."

Does the value returned from tell() not work in seek()? That would be the only bug here.

----------
nosy: +eric.smith

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


More information about the Python-bugs-list mailing list