Origin of 'self'

Terry Reedy tjreedy at udel.edu
Mon Mar 3 19:35:37 CET 2014


On 3/3/2014 1:16 AM, Westley Martínez wrote:
> I understand that in an object method the first argument in the
> object itself, called self.  However, it doesn't have to be called
> self, and can be called anything.  So my question is why is it called
> self and not this like from C++ and Java.  It's kind of a silly
> question, but one that I'm curious about nevertheless.

Three responses and I learned or had something pointed out in each. That 
is a better track record than most threads.

-- 
Terry Jan Reedy





More information about the Python-list mailing list