Yury Selivanov <yseliva...@gmail.com> added the comment: I've been thinking a lot about this problem, and I'm really tempted to fix sock.type property:
1. The problem first appeared in Python 3.2. 2. Python 2.7 doesn't have this problem at all, and doesn't even export socket.SOCK_NONBLOCK. If we fix this in 3.7 it *will* actually help some poor souls with porting their network applications. 3. People use Python when they want a high-level portable language. This annoying Linux quirk makes it super hard to write correct socket code. 4. I can't actually come up with any decent Linux-only example of using this quirk of socket.type. Why would one check if sock.type has SOCK_NONBLOCK? And even if they check it, one call to sock.settimeout() will make sock.type information outdated and simply wrong. Let's just fix sock.type? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32331> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com