Antoine Pitrou added the comment:

> 1) IOError and ValueError are not subclasses one of another. So what
> should we expect an IOBase implementation to raise?

Ideally, ValueError should be raised, but I suspect some methods raise IOError 
instead.

> Undefined behavior means literally anything can happen.

In practice, it will either raise an error, or be ignored. For example, calling 
close() a second time would be ignored. Calling readable() may return the 
original value (before the file was closed), etc.

Any non-trivial behaviour should be reported as a bug, though. Especially, 
reading or writing methods (read(), write(), readline() etc.) should *never* 
succeed on a closed file.

----------
components: +IO
nosy: +pitrou
stage:  -> needs patch
versions: +Python 3.2, Python 3.3

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

Reply via email to