Why the 'self' argument?

John Roth newsgroups at jhrothjr.com
Fri Sep 5 18:24:51 EDT 2003


"Michael Peuser" <mpeuser at web.de> wrote in message
news:bjat11$70s$07$1 at news.t-online.com...
>
> "Grzegorz Staniak" <gstaniak at inka.zagiel.pl>
>
> > I'm a newbie Python user, a systems administrator - I've been trying
> > to switch from Perl to Python for administrative tasks - and one thing
> > I cannot understand so far is why I need the special 'self' (or anything
> > esle) argument in class method definitions.
>
> You probably do not mean "class methods"; this a technical term in OOP.
>
> The Python class basics are *very* similar to the implementation of Perl
> classes!!
> You should not have much problems....

Actually, I think he *does* mean "class methods." They are new in 2.2
after all, and I missed the qualification the first time around.

John Roth
>
> Kindly
> Michael P
>
>






More information about the Python-list mailing list