Message77294
Python 2 is very platform-dependent: fdopen simply call the C function
fdopen() and returns a FILE*.
Since the sample code is a mistake (read on a file open in write mode),
how and when the error shows up really depends on the platform's
implementation of the FILE* object.
On the other hand Python 3 re-implemented all this, no FILE is used. The
io.UnsupportedOperation("BufferedWriter.read() not supported") is much
better IMO. And note that io.UnsupportedOperation is a IOError as well.
However the AttributeError is inconsistent. The attached patch turns it
into a UnsupportedOperation as above. |
|
Date |
User |
Action |
Args |
2008-12-08 10:19:57 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, ironfroggy, habnabit, eggy |
2008-12-08 10:19:57 | amaury.forgeotdarc | set | messageid: <1228731597.59.0.0535729970205.issue4579@psf.upfronthosting.co.za> |
2008-12-08 10:19:56 | amaury.forgeotdarc | link | issue4579 messages |
2008-12-08 10:19:56 | amaury.forgeotdarc | create | |
|