calling a class instance of function

Julio Biason slow at slowhome.org
Wed Dec 20 21:32:16 EST 2006


On Wed, December 20, 2006 22:09, Pyenos wrote:
> class pid:
>     "pid"
>     def add(original_pid,toadd):
[...]
>     def remove(something_to_remove_from,what):
[...]
>     def modify(source,element,changewiththis):
[...]

> why do i get an error?

Did you copy'n'pasted the code here or typed it directly?

My guess is that the missing "self" as first parameter in the methods
could be causing the problem.

-- 
Julio "slow" Biason




More information about the Python-list mailing list