This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ellisj
Recipients ellisj, janssen
Date 2008-09-04.20:14:41
SpamBayes Score 5.643698e-07
Marked as misclassified No
Message-id <1220559283.73.0.0765581663474.issue1291446@psf.upfronthosting.co.za>
In-reply-to
Content
Here is the exact SSLObject.read documentation from 2.5 (although the 
bug was filed against 2.4, and 2.6 will be out soon, the docs are the 
same):

-----

read([n])

If n is provided, read n bytes from the SSL connection, otherwise read 
until EOF. The return value is a string of the bytes read.

-----

This is not ambiguous.  Similarly, help(file.read) is not ambiguous.  
(The "at most" part in the first line of file.read is later explained 
to apply to non-blocking reads.)

If you want to claim "well, it's not a file-like object" then (a) it 
shouldn't have file-like methods (socket-like send and recv are the 
obvious choices instead of write and read), (b) you need to fix your 
docs.  But since god knows how many programs are out there expecting 
the semantics explained by the existing docs, I think just fixing the 
bug in the code is better than defining away the problem.

(Obviously socket.makefile won't work on an object that doesn't 
implement a socket-like interface, so that's a non-option.)
History
Date User Action Args
2008-09-04 20:14:43ellisjsetrecipients: + ellisj, janssen
2008-09-04 20:14:43ellisjsetmessageid: <1220559283.73.0.0765581663474.issue1291446@psf.upfronthosting.co.za>
2008-09-04 20:14:42ellisjlinkissue1291446 messages
2008-09-04 20:14:42ellisjcreate