The need to put "self" in every method

Peter Maas peter at somewhere.com
Thu Jun 2 03:21:10 EDT 2005


Fernando M. schrieb:
> i was just wondering about the need to put "self" as the first
> parameter in every method a class has because, if it's always needed,
> why the obligation to write it? couldn't it be implicit?
> 
> Or is it a special reason for this being this way?

See section 1.4.4 in http://www.python.org/doc/faq/general.html

-- 
-------------------------------------------------------------------
Peter Maas,  M+R Infosysteme,  D-52070 Aachen,  Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------



More information about the Python-list mailing list