This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients BoppreH, paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware
Date 2017-12-04.07:29:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1512372583.44.0.213398074469.issue30213@psf.upfronthosting.co.za>
In-reply-to
Content
The problem is that seek() doesn't work properly with files opened in append mode.

with open('file', 'ab') as f:
    f.write(b'abcd')
    f.seek(0)
    f.write(b'efgh')
    f.flush()

with open('file', 'rb') as f:
    print(f.read())

The result is b'abcdefgh' instead of expected b'efgh'.
History
Date User Action Args
2017-12-04 07:29:43serhiy.storchakasetrecipients: + serhiy.storchaka, paul.moore, tim.golden, zach.ware, steve.dower, BoppreH
2017-12-04 07:29:43serhiy.storchakasetmessageid: <1512372583.44.0.213398074469.issue30213@psf.upfronthosting.co.za>
2017-12-04 07:29:43serhiy.storchakalinkissue30213 messages
2017-12-04 07:29:43serhiy.storchakacreate