Message9845
-0 is more accurate.
The test that fails is testing that an instance of SpooledTemporaryFile is not backed by a real file until you call fileno(), in a sequence of tests that several other methods either do or don't provoke this change of implementation. This gives me an idea.
Suppose we implement a table in Jython, of file-like objects (deliberately vague term). File-like objects are not entered by default (stdin, stout, stderr are), but they are entered when any action, like fileno(), requires them to have an integer fd. After that, one can look up the (raw) file by fd, for example in fdopen(). The index we assign is from that table, not as found in java.io.FileDescriptor. The difficulties associated with the shared global state are borne only by those who need the low-level facilities of the os module. |
|
Date |
User |
Action |
Args |
2015-04-14 19:04:53 | jeff.allen | set | messageid: <1429038293.99.0.28676264644.issue2320@psf.upfronthosting.co.za> |
2015-04-14 19:04:53 | jeff.allen | set | recipients:
+ jeff.allen, zyasoft |
2015-04-14 19:04:53 | jeff.allen | link | issue2320 messages |
2015-04-14 19:04:53 | jeff.allen | create | |
|