John Hergenroeder added the comment:

Thanks for the feedback, Berker!

I've added a test case that closes a buffered reader and then attempts to both 
peek and read1 it. I tacked it onto the end of the BufferedReaderTest class in 
test_io, but let me know if there's a better place to put it.

I've also added the check to read1 -- good catch. I opted to add it before the 
check that the argument to read1 is 0 -- my assumption is that a 0-length read 
on a closed BufferReader should fail, not return an empty bytestring.

Thanks again for the feedback!

----------
Added file: http://bugs.python.org/file38787/23796_fix_with_tests.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23796>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to