Martin Panter added the comment: Some of the docstrings already mention UnsupportedOperation. This patch updates the rest of the documentation. Also adds some tests to verify this on all the concrete classes I could think of. Some discoveries in the process:
* BufferedWriter.readable() and BufferedReader.writable() could return True depending on the underlying raw stream. Fixed to always return False. * Removed a branch in a test case that assumed BufferedReader.close() did not call flush(), but never activated due to the above writable() bug * seek(), tell() and truncate() do not raise UnsupportedOperation, despite seekable() == False, at least for a pipe. Adjusted doc strings. ---------- keywords: +patch Added file: http://bugs.python.org/file37520/UnsupportedOperation.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22854> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com