homepage

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 pitrou
Recipients bsdphk, pitrou
Date 2012年08月18日.20:36:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1345322014.4150.11.camel@localhost.localdomain>
In-reply-to <1345321809.28.0.754330519069.issue15723@psf.upfronthosting.co.za>
Content
> I have not tried io.open(), nor would I suspect most users would
> realize that they needed to do so, in order to get the canonical
> behaviour from an operation called "write" on a file opened in
> "append" mode.
The reason I'm asking is that open() is the same as io.open() in Python
3.x, which is currently the main development line. That said, I can find
the results myself.
Python 2 is in bugfix mode, so it's impossible to rewrite the I/O
routines to use unbuffered I/O instead of C buffered I/O.
> IMO: If pythons file.write() does not give the guarantee POLA would
> indicate, it's either a bug or a doc-issue, no matter how many
> workarounds might exist.
What do you call POLA?
> But I have neither a clue to the aspirational goals of python, nor to
> what it might take to fix this, so it's entirely your call.
Well as I said, Python 2 will be pretty much impossible to fix (we call
fwrite() with the argument, not write()). Python 3 is a different story
since we use our own buffering layer and then C's unbuffered API.
As a sidenote, do you know if writev() has the same guarantee as
write()? POSIX doesn't seem to say so.
History
Date User Action Args
2012年08月18日 20:36:40pitrousetrecipients: + pitrou, bsdphk
2012年08月18日 20:36:39pitroulinkissue15723 messages
2012年08月18日 20:36:39pitroucreate

AltStyle によって変換されたページ (->オリジナル) /