That's because the socket.py code has been adapted (the first word I wrote there was "perverted" :--) to deal with this case.  That is, the close() has been rendered meaningless because of the explicit reference counting in socket.py.  But the right solution is to not close the socket till the application is done with it; that is, transfer the responsibility for the socket to the part of the application which is still using it.  I'm not sure that just fixing this one case will remove the need for the explicit reference counting in socket.py, but this is the case that I noticed.

On Nov 26, 2007 1:11 PM, Guido van Rossum <report@bugs.python.org> wrote:

Guido van Rossum added the comment:

Bill, is there a code example that should work but breaks because of
that close()?  ATM, there doesn't seem to be anything in the tests that
breaks...

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue1348 >
__________________________________