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 vstinner
Recipients nicksjacobson, pitrou, steve.dower, tim.golden, vstinner, zach.ware
Date 2014-10-16.08:03:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1413446614.68.0.219502366521.issue22651@psf.upfronthosting.co.za>
In-reply-to
Content
Python 3 documentation is explicit about the "a" mode:
"open for writing, appending *to the end* of the file if it exists"
https://docs.python.org/dev/library/functions.html#open

Python 2 is based on the stdio.h of the C standard library which behaves differently. fopen() documentation:
"Open for appending (writing *at end of file*).
http://linux.die.net/man/3/fopen

IMO it's a bug in the C library. It's probably yet another bug in the C standard library on Windows:
http://haypo-notes.readthedocs.org/python.html#bugs-in-the-c-stdio-used-by-the-python-i-o
History
Date User Action Args
2014-10-16 08:03:34vstinnersetrecipients: + vstinner, pitrou, tim.golden, zach.ware, steve.dower, nicksjacobson
2014-10-16 08:03:34vstinnersetmessageid: <1413446614.68.0.219502366521.issue22651@psf.upfronthosting.co.za>
2014-10-16 08:03:34vstinnerlinkissue22651 messages
2014-10-16 08:03:34vstinnercreate