Julien Palard added the comment:

Hi, thanks for your contribution!

Documentation give examples implementation of your methods:

 - https://docs.python.org/3/library/socket.html#socket.socket.sendmsg 
 - https://docs.python.org/3/library/socket.html#socket.socket.recvmsg

and from here, some remarks:

 - Why allowing people to mix fds and file objects? I'm not a fan of this: I 
prefer the clarity of allowing only file descriptors. Have you seen such 
methods (allowing both fd and file obj) in the stdlib?
 - The documented implementation for recv_io checks for integer truncation, 
there may be a good reason, should'n you do the same?
 - The documented implementation allows to pass a message, shouldn't you at 
least allow for an optional message to be passed?

Adding those methods may make sense if people are copying send_fds/recv_fds in 
their code, but I found only two copy/paste in github, so I think the best is 
to put your code as a module on pypi and see, from here, if it gets popular?

You should also write a few tests, and comply to the PEP8 (your two methods 
should probably be separated by a newline).

Bests

----------
nosy: +mdk

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28724>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to