|Marked as misclassified
>>> f = file('x.tmp', 'wb')
>>> fd = f.fileno()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 9] Bad file descriptor
In this code:
we get at the integer file descriptor (index) via the private member fd. In my experience (with the debugger) fd is only ever -1, but there is an extra member that holds a Windows file handle.
This is the cause of a failure in test_tempfile, but not elsewhere as I believe we have comprehensively adapted to file descriptors that are objects.
If we support integer file descriptors, don't we need a table for them to index, as in C (and CPython)?
|2015-04-10 15:32:48||jeff.allen||set||messageid: <email@example.com>|
|2015-04-10 15:32:48||jeff.allen||link||issue2320 messages|