Why self?
Tim Hammerquist
tim at vegeta.ath.cx
Fri Jul 5 05:51:27 EDT 2002
Jesper Olsen graced us by uttering:
> Why is it necessary to use a "self" argument to class methods in python?
>
> To me it seems a bit like doing object oriented programming in C...
>
> Why not make it implicit like "this" in C++?
>
> I do not find it usefull that I can give it my own name.
>
> So, is it just legacy or is there a reason for this convention?
The following link contains an answer to your question.
http://www.python.org/cgi-bin/faqw.py?req=show&file=faq06.007.htp
HTH
Tim Hammerquist
--
Life *is* pain, Highness. Anyone who says differently is selling something.
-- Westley, "The Princess Bride"
More information about the Python-list
mailing list