I need it because the "various code" may raise other exceptions (not related to sockets). In such case, the "except socket.error, x:" won't catch it, but thanks to the "finally:", it is sure that the socket will close.
-- http://mail.python.org/mailman/listinfo/python-list