[Python-Dev] SocketServer and UserDict patches

Ka-Ping Yee ping@lfw.org
Tue, 10 Apr 2001 18:06:36 -0700 (PDT)


On Tue, 10 Apr 2001, Guido van Rossum wrote:
> > > > 1.  UserDict.get(), .update(), and .setdefault()
[...]
> Let's just fix this after releasing 2.1, OK?

Okay.

> As you say, it's
> unlikely that this affects anybody one way or the other

True, it is largely about people writing *new* scripts conveniently.

> > > > 2.  SocketServer.StreamRequestHandler
[...]
> Alas, this is still at the wrong level.  The get_request() method is
> overridable (e.g. by the UDPServer class) and the request that it
> returns may not have a close method.  The best I can come up with is
> to add an empty method self.close_request(request) to the base class,
> call it in handle_request(), and override it to call request.close()
> in the TCPServer class.

Yes, i agree that's a good division of responsibilities.  See the
updated patch.  I think it would be nice if it could go in, but it's
up to you if you want to accept it.


-- ?!ng

"Don't worry about people stealing an idea.  If it's original, you'll
have to jam it down their throats."
    -- Howard Aiken