This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author larry
Recipients larry
Date 2014-01-29.03:48:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390967300.86.0.244728862469.issue20431@psf.upfronthosting.co.za>
In-reply-to
Content
While working on posixmodule.c today I noticed that some functions that accept file descriptors call PyObject_AsFileDescriptor().  This function accepts ints.  It *also* accepts objects that expose a .fileno() attribute, calling that attribute and using the integer it returns.

There are *other* functions in posixmodule.c that accept file descriptors that call _fd_converter(), which just looks for an int with a proper value.

I figure it should be one way or the other.  Should everything in posix that accepts file descriptor ints accept the .fileno() convention too?
History
Date User Action Args
2014-01-29 03:48:20larrysetrecipients: + larry
2014-01-29 03:48:20larrysetmessageid: <1390967300.86.0.244728862469.issue20431@psf.upfronthosting.co.za>
2014-01-29 03:48:20larrylinkissue20431 messages
2014-01-29 03:48:20larrycreate