Simple questions about classes
grante at visi.com
Tue Feb 11 21:23:09 CET 2003
In article <bbb4a9e1.0302111148.48dc074b at posting.google.com>, Natan wrote:
> I think self points to the class,
No, self points to an instance of the class.
> but why do we need to pass this parameter to every function?
While you have to declare it, you don't have to pass it when
you're calling a bound method. You only have to pass it when
calling an unbound method:
a1 = A()
a2 = A()
Grant Edwards grante Yow! .. Do you like
at "TENDER VITTLES?"?
More information about the Python-list