On Mon, Apr 14, 2008 at 2:29 PM, Ralf Schmitt <[EMAIL PROTECTED]> wrote: > > Sorry to reply on the mailing list. But this change is wrong. > e.g. if you're using a buffer size of 16 bytes and try to read 256 bytes, it > should call recv with a value of 256 and not call recv 16 times with a value > of 16. > However, there should be an upper limit (as shown by the imap bug).
There is an upper limit. It's called "the buffer size". If someone specifies a buffer size of 16 bytes, it means "read 16 bytes at a time". I don't know why someone would want such a small buffer size, but presumably they have their reasons. The only reason "min" is a problem is that there's standard library code passing a zero to socket.makefile, which gets turned into a bufsize of 1 by the constructor. I actually agree with Bill Janssen -- __init__ is where the real problem lies. But I think the change to read() is safer. -- Curt Hagenlocher [EMAIL PROTECTED] _______________________________________________ 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