"Ara Kooser" <[EMAIL PROTECTED]> wrote
> So I have a class set up and running. My question is how you append
> a
> list (such as self.contents = [ ]) using a method like def
> AddObject?
> class Area:
> #Methods. What you can do.
> def AddObject(self,thing):
> #pass
> self.contents.append()
>
You are almost there but you need to pass 'thing' to the append:
self.contents.append(thing)
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor