[Tutor] understanding classes

Gregor Lingl glingl@aon.at
Tue, 13 Aug 2002 23:15:40 +0200


Lance E Sloan schrieb:

>
> I have one question:  As far as you know, is "self" in Python 
> basically the same as "this" in Java?
>
As far as I understand it, YES.
But there is one important difference: "this" is a token, or name, with 
this special meaning,
(you write this.<method> in Java) whereas self inPython is characterized 
as a
positional argument - in the first position of the agument-list -  which 
could
equally well be named wrtlbrmpfd :::-)

Maybe someone else can explain this mor accurately

Gregor