Pyenos wrote: > class test(pid): > pid.original=[1,2,3] > pid.toadd=4 > pid.add(pid.original,pid.toadd) # error here says that > # it expects pid instance as first arg > # not a list that it got. > > why do i get an error?
'test' is a class here, and the pid you tried to pass it is actually the class it is inheriting from. I think you wanted to do: def test(pid): ... Also, in order to call a function without arguments you still need to use (), so you probably wanted to use pid.original() in your pid.add call. Brett Hoerner -- http://mail.python.org/mailman/listinfo/python-list