Re: [Python-Dev] BufferedReader.peek() ignores its argument

2009-04-05 Thread Antoine Pitrou
Alexandre Vassalotti peadrop.com> writes: > > I am not sure if this is a good idea. Currently, the argument of > peek() is documented as a lower bound that cannot exceed the size of > the buffer: Unfortunately, in practice, the argument is neither a lower bound nor an upper bound. It's just used

Re: [Python-Dev] BufferedReader.peek() ignores its argument

2009-04-04 Thread Alexandre Vassalotti
On Sat, Apr 4, 2009 at 9:03 PM, Antoine Pitrou wrote: > Hello, > > 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.

Re: [Python-Dev] BufferedReader.peek() ignores its argument

2009-04-04 Thread Aahz
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 bi

Re: [Python-Dev] BufferedReader.peek() ignores its argument

2009-04-04 Thread Benjamin Peterson
2009/4/4 Antoine Pitrou : > Hello, > > 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 an

[Python-Dev] BufferedReader.peek() ignores its argument

2009-04-04 Thread Antoine Pitrou
Hello, 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 t