[New-bugs-announce] [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode

PEW's Corner report at bugs.python.org
Sat Mar 23 20:33:45 EDT 2019


New submission from PEW's Corner <pewscorner at gmail.com>:

When a file is opened in binary append+read mode, i.e. open('file', 'a+b'), and a write (i.e. append) operation is performed while the file pointer is not at the end of the file (e.g. after a seek(0)), tell() will subsequently return the wrong value in Python 3 (but not in Python 2).

See this SO question:
https://stackoverflow.com/questions/51010322/python-3-tell-gets-out-of-sync-with-file-pointer-in-appendread-mode

----------
components: IO
messages: 338709
nosy: pewscorner
priority: normal
severity: normal
status: open
title: Python 3 f.tell() gets out of sync with file pointer in binary append+read mode
type: behavior
versions: Python 3.6, Python 3.7

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


More information about the New-bugs-announce mailing list