Re: Error when creating class
flaviostz schrieb: Hi, I wrote this small program: class Simples: def minha_func (valor1, valor2): return valor1 - valor2 mf = Simples() x = mf.minha_func(2, 3) print x But when I try execute it, python interpreter gives me this error: Traceback (most recent call last):
Re: Error when creating class
You forgot the self in minha_func. -- []' - Walter waltercruz.com -- http://mail.python.org/mailman/listinfo/python-list