[issue42733] [issue] io's r+ mode truncate(0)

施文峰 report at bugs.python.org
Thu Dec 24 22:23:11 EST 2020


New submission from 施文峰 <ke265379ke at gmail.com>:

happen at io's reading & updating(r+) mode
after read,
file object's postion stay in last if you remove whole content ( truncate(0) ),
postion wil not back to 0 still stay in the last
then you start writing from last position(not 0)
that's why problem happen

test case can check here https://github.com/841020/open_source

----------
components: IO
files: Screenshot from 2020-12-25 10-46-42.png
hgrepos: 396
messages: 383710
nosy: ke265379ke
priority: normal
severity: normal
status: open
title: [issue] io's r+ mode truncate(0)
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49697/Screenshot from 2020-12-25 10-46-42.png

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


More information about the Python-bugs-list mailing list