[issue5541] File's current position inconsistent with 'a+' mode

"Martin v. Löwis" <report@bugs.python.org> at psf.upfronthosting.co.za "Martin v. Löwis" <report@bugs.python.org> at psf.upfronthosting.co.za
Mon Mar 23 22:01:30 CET 2009

Martin v. Löwis <martin at v.loewis.de> added the comment:

In 2.x, the mode will do whatever the C library does; this is as it
ought to be. Standard C lets it explicitly implementation-defined
whether the file position pointer is initially at the beginning or at
the end of a file when the file is opened for append. Any write
operating will automatically move the file pointer to the end of the
file; switching between reading and writing must be synchronized with
either a flush operation or a file positioning operation.

So I'm closing this as "won't fix".

nosy: +loewis
resolution:  -> wont fix
status: open -> closed

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list