how to give an object as argument for a method

Greg Ewing greg at cosc.canterbury.ac.nz
Wed Mar 6 21:28:09 EST 2002


Marco Herrn wrote:
> 
> hmm, do I have to implement that in _every_ method or just in
> methods who use the 'self' statement?

In every method. The instance is always passed in
as the first parameter, so there must be a parameter
there to receive it, even if it's not used inside
the method.

-- 
Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:	  
http://www.cosc.canterbury.ac.nz/~greg



More information about the Python-list mailing list