[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

Giampaolo Rodola' report at bugs.python.org
Sat Jan 25 21:00:29 CET 2014


Giampaolo Rodola' added the comment:

> Please find a better name for the type enum and document the new enums.

Why should new enums be documented and how are they useful?
IMO socket module adopted enum module only to provide a better representation of AF_* and SOCK_* constants on repr(), which is fine.
The fact that in order to do that enum module forces you to create a container is incidental and should not result in polluting socket module API (which is already pretty crowded).
In summary I'd be for renaming those enums to _SocketType and _AddressFamily.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20386>
_______________________________________


More information about the Python-bugs-list mailing list