On 2/28/07, Daniel Stutzbach <[EMAIL PROTECTED]> wrote: > What should Buffered I/O .write() do for a non-blocking object?
> It seems like the .write() should write as much as it can to the Raw > I/O object and buffer the rest, but then how do we tell the Buffered > I/O object to "write more data from the buffer but still don't block"? Why bother? The buffer layer should ensure that it gets written eventually, if only at buffer finalization. A (blocking) flush says "commit whatever you have *right now*". Needing anything in between is probably rare enough that it makes sense to let concrete objects handle it on their own, without a standardized method. This semi-flush seems far less important than a non-blocking read, which Guido has already said doesn't need standardization. > Option #2: Calling .write() with no arguments causes the Buffer I/O > object to flush as much write data to the raw object, but won't block. Writing a zero-length string should probably give it another chance to process the buffer if it wants to, but ... I don't think it should be *forced* to try, if it doesn't think there is enough data yet. That is what flush is for. -jJ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com