On Sun, Apr 05, 2009, Antoine Pitrou wrote:
> 
> Currently, BufferedReader.peek() ignores its argument and can return
> more or less than the number of bytes requested by the user. This is
> how it was implemented in the Python version, and we've reflected this
> in the C version.
>
> It seems a bit strange and unhelpful though. Should we change the
> implementation so that the argument to peek() becomes the upper bound
> to the number of bytes returned?

IIRC, this was made to handle SSL where the number of bytes returned may
need to be larger than the size.  If that's the case, there should be a
record somewhere in the list archives...  (Or possibly the svn logs.)
-- 
Aahz (a...@pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it."  --Brian W. Kernighan
_______________________________________________
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

Reply via email to