New submission from Antoine Pitrou <pit...@free.fr>: This decrepancy between 2.x and 3.x is witnessed under Windows:
Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> sock = socket.create_connection(("www.python.org", 80)) >>> sock.close() >>> sock.send(b"x") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\python27\lib\socket.py", line 170, in _dummy raise error(EBADF, 'Bad file descriptor') socket.error: [Errno 9] Bad file descriptor Python 3.2.1 (default, Jul 10 2011, 20:02:51) [MSC v.1500 64 bit (AMD64)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> sock = socket.socket(); sock.connect(("www.python.org", 80)) >>> sock.close() >>> sock.send(b"x") Traceback (most recent call last): File "<stdin>", line 1, in <module> socket.error: [Errno 10038] An operation was attempted on something that is not a socket I'm not sure this is worth fixing, though. ---------- components: Library (Lib) messages: 147039 nosy: exarkun, pitrou priority: low severity: normal status: open title: closed sockets don't raise EBADF anymore type: behavior versions: Python 3.2, Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13344> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com