Frederick Reeve <cylix <at> solace.info> writes: > > peek(n): > If n is less than 0, None, or not set; return buffer contents with out > advancing stream position. If the buffer is empty read a full chunk and > return the buffer. Otherwise return exactly n bytes up to _chunk > size_(not contents) with out advancing the stream position. If the > buffer contents is less than n, buffer an additional chunk from the > "raw" stream before hand. If EOF is encountered during any raw read > then return as much as we can up to n. (maybe I should write that in > code form??)
This proposal looks reasonable to me. Please note that it's too late for 3.1 anyway - we're in release candidate phase. Once you have a patch, you can post it on the bug tracker. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com