Message169663
| Author |
pitrou |
| Recipients |
alexkon, docs@python, pitrou |
| Date |
2012年09月01日.19:13:58 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1346526839.49.0.306349459602.issue15840@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> 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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年09月01日 19:13:59 | pitrou | set | recipients:
+ pitrou, docs@python, alexkon |
| 2012年09月01日 19:13:59 | pitrou | set | messageid: <1346526839.49.0.306349459602.issue15840@psf.upfronthosting.co.za> |
| 2012年09月01日 19:13:58 | pitrou | link | issue15840 messages |
| 2012年09月01日 19:13:58 | pitrou | create |
|