Erik Bray added the comment:

>> Whereas the behavior of O_APPEND causes an automatic seek to the end
>> before any write().

> True, but IIRC some systems seek on open() and some systems seek just before 
> write().

I figured that workaround that seeks to the end on open was an attempt to 
normalize behavior between different systems, and seems to me like a reasonable 
compromise to support systems that somehow don't support append.

But a better compromise I think would be to seek to the beginning of the file 
and modify fileio_write and friends to always seek to the end before a write if 
the file was opened in append mode. This would be more in line with the POSIX 
behavior.

I have no idea on what systems O_APPEND isn't supported, but I figured they 
must exist because someone put an #ifdef in there once :)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18876>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to