Message233750
Is the current documentation as accurate as it can be?
“The number of bytes returned may be less or more than requested”
To me this has always made this method practically useless. A valid implementation could just always return b"". I noticed the BZ2File.peek() documentation (BZ2File is apparently trying to imitate BufferedReader) is slightly more useful:
“At least one byte of data will be returned (unless at EOF)”
That could be used for (say) peeking for a LF following a CR. But still the “size” parameter does not seem very useful. In fact, LZMAFile.peek() says the size is ignored. |
|
Date |
User |
Action |
Args |
2015-01-09 12:59:20 | martin.panter | set | recipients:
+ martin.panter, ncoghlan, pitrou, benjamin.peterson, trott, conf |
2015-01-09 12:59:20 | martin.panter | set | messageid: <1420808360.88.0.328105758204.issue5811@psf.upfronthosting.co.za> |
2015-01-09 12:59:20 | martin.panter | link | issue5811 messages |
2015-01-09 12:59:20 | martin.panter | create | |
|