施文峰 <[email protected]> added the comment:
hi Steven
thanks for check my post
first test have a problem,you didn’t use r+ mode
step is
1. f.read
2. f.truncate(0)
3. f.write(something)
my test msg tell you
“
tell after delete content 33
content 0
tell after write 65
“
so you know after truncate f.tell =33
but no content in file
and after you write something into file
msg tell you f.tell =65
but “ {"how_dare_you": "how_dare_you"}” is only 33 length
so you know must have someing in file
please use editor open the file
you will find it
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue42733>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com