Message98909
I think that certain FileIO methods should raise IOError instead of
ValueError when a file operation is attempted with the wrong mode.
The methods of IOBase are documented to raise IOError in these situations.
>>> import io
>>> f = io.open("testfile", "w")
>>> f.read()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: not readable
>>>
>>> f = io.FileIO("testfile", "w")
>>> f.read()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: File not open for reading |
|
Date |
User |
Action |
Args |
2010-02-05 21:28:20 | skrah | set | recipients:
+ skrah, pitrou, stutzbach |
2010-02-05 21:28:20 | skrah | set | messageid: <1265405300.06.0.973184216127.issue7862@psf.upfronthosting.co.za> |
2010-02-05 21:28:18 | skrah | link | issue7862 messages |
2010-02-05 21:28:18 | skrah | create | |
|