"self" - a python wart or "feature"

Manuel M. Garcia mail at manuelmgarcia.com
Mon Feb 17 05:27:16 CET 2003


On 16 Feb 2003 20:04:20 -0800, ceremona2000 at yahoo.com (Cere Davis)
wrote:
>I don't understand why Python requires "self" as the first argument in
>every function that intends to act on a instance of a given class eg:

>From the Python FAQ:

http://www.python.org/cgi-bin/faqw.py?req=show&file=faq06.007.htp

Search for this message ID in Google Groups, to read a thread about
this very question (only 4 days old):

Message-ID: <3E4A2237.4080800 at aon.at>

In Ruby you don't have to use 'self'.  Different people like different
scripting languages.  Python, Perl, Ruby are all very good, and all
three are free to try out.

Manuel




More information about the Python-list mailing list