[cse491] convert to class

Alex Nolley nolleyal at msu.edu
Sun Oct 5 08:51:38 PDT 2008


That's what I was originally thinking of doing except that if you have a
class, you have to first declare an instance of that class in order to use
it. If you try to use the functions without doing that or without specifying
an object of that class to pass into the function (the self argument) Python
chokes. Right now I don't see a way to use a server class and still have
that program pass Titus's tests. Please correct me if I'm wrong though.

-----Original Message-----
From: Taylor Marshall [mailto:tmarsh253 at gmail.com] 
Sent: Sunday, October 05, 2008 12:53 AM
To: Alex Nolley
Subject: Re: [cse491] convert to class

You could make functions to match the ones in the tests, and just have
them call your class methods.    Not sure if this is allowed but it
would work.


On Sat, Oct 4, 2008 at 11:41 PM, Alex Nolley <nolleyal at msu.edu> wrote:
> Hey I want to convert my collection of functions in my webserve file into
> one server class because I think this will make all the functions simpler
to
> execute. I'm wondering though, is this even possible with the way Titus's
> tests are set up? His test file calls webserve.<function> while the class
> implementation would have to call webserve.<class>.<function> after first
> creating an instance of the class the coder (us) wrote. Maybe someone has
a
> better idea.
>
>
>
> Thanks,
>
> Alex
>
>
>
> _______________________________________________
> cse491-fall-2008 mailing list
> cse491-fall-2008 at lists.idyll.org
> http://lists.idyll.org/listinfo/cse491-fall-2008
>
>




More information about the cse491-fall-2008 mailing list