Message209613
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? |
|
Date |
User |
Action |
Args |
2014-01-29 03:48:20 | larry | set | recipients:
+ larry |
2014-01-29 03:48:20 | larry | set | messageid: <1390967300.86.0.244728862469.issue20431@psf.upfronthosting.co.za> |
2014-01-29 03:48:20 | larry | link | issue20431 messages |
2014-01-29 03:48:20 | larry | create | |
|