Python 3K or Python 2.9?
zzbbaadd at aol.com
Thu Sep 13 18:43:13 CEST 2007
> > Here is a link to a tutorial where Sun is talking about the this
> > reference:
> That's a tutorial for getting you started, no reference
> documentation or in-depth course.
Here's a FAQ item where they refer to it as I think Python should have
done it - a special predefined variable:
"Java provides a special, predefined variable named "this" that you
can use for such purposes. The variable, this, is used in the source
code of an instance method to refer to the object that contains the
method. This intent of the name, this, is to refer to "this object,"
the one right here that this very method is in. If x is an instance
variable in the same object, then this.x can be used as a full name
for that variable. If otherMethod() is an instance method in the same
object, then this.otherMethod() could be used to call that method.
Whenever the computer executes an instance method, it automatically
sets the variable, this, to refer to the object that contains the
"this" is hard to query on but I would be interested in seeing some
site talking about Java where "this" is mentioned as being "passed
More information about the Python-list