[cse491] classes

C. Titus Brown ctb at msu.edu
Sun Oct 25 19:09:57 PDT 2009


On Sun, Oct 25, 2009 at 08:50:39PM -0400, Joseph Christian Blossom wrote:
> Is there a way so that I do not have to copy and paste code from webserve to
> webserve_nb? More specifically, handle_connection. I'm pretty certain mine
> works as is, however, it won't pass the tests as i'm using the
> handle_connection in webserve and therefore it's not a member of
> NonblockingServer. (and produces errors saying handle_connection is not a
> member method of NonblockingServer, because it's not)

Hey Joe, all sorts of ways -- you just need to copy the names over.

For example,

	from webserve import Server as NonblockingServer

will just do what it says, or you can subclass from Server:

	from webserve import Server

	class NonblockingServer(Server):
	   ...

cheers,
--t
-- 
C. Titus Brown, ctb at msu.edu



More information about the cse491-fall-2009 mailing list