"TheFlyingDutchman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Here's a FAQ item where they refer to it as I think Python should have | done it - a special predefined variable: | | http://www.faqs.org/docs/javap/c5/s5.html | | "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 | method."
In Python, methods are (functions) contained in (are attributes of) classes. Hence, by the above, 'this' or 'self' would be set to the class and not the instance. So the above would require some rewording for Python. -- http://mail.python.org/mailman/listinfo/python-list