Author martin.panter
Recipients benjamin.peterson, martin.panter, pitrou, serhiy.storchaka, stutzbach
Date 2016-03-13.12:01:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Calling BufferedReader.read1(sys.maxsize) gives me a MemoryError. Making read1(-1) equivalent to read1(sys.maxsize) only makes sense where the return value already has a predetermined size, and only a limited buffer needs to be allocated.

Another interpretation is to return an arbitrary, modest buffer size. This is what I ended up doing with LZMAFile.read1() in Issue 23529: return no more than 8 KiB. It is not equivalent to sys.maxsize because more than 8 KiB is possible if you ask for it. HTTPResponse (for non-chunked responses) is similar, but uses a default of 16 KiB.
Date User Action Args
2016-03-13 12:01:15martin.pantersetrecipients: + martin.panter, pitrou, benjamin.peterson, stutzbach, serhiy.storchaka
2016-03-13 12:01:15martin.pantersetmessageid: <>
2016-03-13 12:01:15martin.panterlinkissue23214 messages
2016-03-13 12:01:15martin.pantercreate