[Python-3000] socket GC worries
Bill Janssen
janssen at parc.com
Tue Oct 30 17:20:11 CET 2007
> Bill Janssen wrote:
>
> > Back to your initial mail (which is
> > more relevant than Greg Ewing's snipe!):
Actually, Bill Janssen didn't write that, but did write this:
> > then in some
> > cases *closes* the socket (thereby reasonably rendering the socket
> > *dead*), *then* returns the "file" to the caller as part of the
> > response.
>
> I don't understand that. What good can returning a *closed* file
> object possibly do anyone?
Indeed. The httplib code is relying on the fact that close(), under
certain circumstances, has no effect. It's just that the
circumstances have changed, in Python 3K. I think that the close() in
HTTPConnection should be removed.
Bill
More information about the Python-3000
mailing list