[issue18524] BufferedReader.read1() documentation/implementation difference
R. David Murray
report at bugs.python.org
Wed Jul 24 16:00:58 CEST 2013
R. David Murray added the comment:
Unless I'm misunderstanding something, the current implementation does match the current documentation: if <buffer-size> < n, returning <buffer-size> bytes is returning "up to n". "Up to" means it could be "less than".
So you are advocating a change in behavior...but I believe there is a reason read1 is implemented the way it is, so I suspect that isn't going to happen. Probably what you want to do is change the buffer size when you open the file so that it is greater than your 'n'.
----------
nosy: +r.david.murray
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18524>
_______________________________________
More information about the Python-bugs-list
mailing list