the.bay.news

Add `getprotobynumber` to the socket module

Discussions on Python.org
Add `getprotobynumber` to the socket module
getprotobyname already exists there. This should be trivial to implement. getservbyport also exists. If we do it for /etc/services, then why not /etc/protocols? It doesn’t make sense to make a multiplication table: getservbyport, getservbyname, getprotobyname, but not getprotobynumber. It creates the implicit expectation by users something exists only for them to find out it doesn’t. Warning: I am aware this is a duplicate or reopening on here. Maybe it was rejected last time but it has been...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.