A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-June/090015.html below:

[Python-Dev] io.BufferedReader.peek() Behaviour in python3.1

[Python-Dev] io.BufferedReader.peek() Behaviour in python3.1 [Python-Dev] io.BufferedReader.peek() Behaviour in python3.1Antoine Pitrou solipsis at pitrou.net
Sat Jun 13 14:33:46 CEST 2009
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.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4