Author jeff.allen
Recipients jeff.allen
Date 2015-04-10.15:32:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
>>> f = file('x.tmp', 'wb')
>>> fd = f.fileno()
>>> type(fd)
<type ''>
>>> os.fstat(fd)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 9] Bad file descriptor
>>> int(fd)
>>> f.close()

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)?
Date User Action Args
2015-04-10 15:32:48jeff.allensetrecipients: + jeff.allen
2015-04-10 15:32:48jeff.allensetmessageid: <>
2015-04-10 15:32:48jeff.allenlinkissue2320 messages
2015-04-10 15:32:47jeff.allencreate