New submission from Giampaolo Rodola': Python 2.7
>>> import socket >>> socket.SocketType <class 'socket._socketobject'> >>> s = socket.socket() >>> isinstance(s, socket.SocketType) True >>> Python 3.4 >>> socket.SocketType <enum 'SocketType'> >>> s = socket.socket() >>> isinstance(s, socket.SocketType) False >>> SocketType was already present and documented in Python 2 so it should be preserved: http://docs.python.org/2/library/socket.html#socket.SocketType Also, socket.SocketType and socket.AddressFamily names suggest they should be public but they're not mentioned in the doc. I think they should just be private though (frankly I fail to understand why a set of constants such as AF_* and SOCK_* should be grouped in a common "container" in the first place). ---------- messages: 209134 nosy: giampaolo.rodola priority: normal severity: normal status: open title: socket.SocketType is different in Python 3.4 versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20386> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com