[Tutor] understanding classes
alan.gauld@bt.com
alan.gauld@bt.com
Wed, 14 Aug 2002 15:48:14 +0100
> My next question was going to be, why is the Python
> convention to name that variable "self" rather than "this"?
Guido's choice I guess.
self is used in Smalltalk and Delphi.
this is used in C++ and Java.
Another language (which I can't recall!) uses 'my' in
the same way.
> Was Java not so well known when this was done?
It wasn't even invented! Python was started in
1989 whereas Java wasn't unveiled till 1994(?)
However C++ was around at the time and using 'this'.
OTOH Smalltalk has used 'self' since 1973....
Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld