[Tutor] understanding classes

Lance E Sloan lsloan@umich.edu
Tue, 13 Aug 2002 13:23:58 -0400


--On Tuesday, August 13, 2002 12:25 AM +0200 Gregor Lingl <glingl@aon.at> 
wrote:
>  * I claim, that the following explanation
>  * HELPS the students to develop a
>  * correct - or at least useful and
>  * usable mental model of the relationship
>  * between classes, objects and the role
>  * of the parameter self.

Gregor,

That was a nice explanation.  I was trying to explain "self" to somebody 
the other day.  I understand it myself, but I wasn't great at articulating 
it.  Your examples are great, especially when Tkinter is available.

I have one question:  As far as you know, is "self" in Python basically the 
same as "this" in Java?

--
Lance E Sloan
Web Services, Univ. of Michigan: Full-service Web and database design,
development, and hosting.  Specializing in Python & Perl CGIs.
http://websvcs.itd.umich.edu/ - "Putting U on the Web"