Origin of 'self'

MRAB python at mrabarnett.plus.com
Tue Mar 4 13:47:09 CET 2014

On 2014-03-04 02:09, Dennis Lee Bieber wrote:
> On Sun, 2 Mar 2014 22:16:31 -0800 (PST), Westley Martínez
> <anikom15 at gmail.com> declaimed the following:
>> 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.
> It didn't want to be egotistical (as I recall, M$ VB uses "me")
So does AppleScript.

In AppleScript a script can refer to the title of a window as "title of
window" or "window's title", and it can refer to the title of its own
window as "title of window of me" or "me's window's title". Consistent,
yes, but bad English.

That's why I prefer a programming language not to be too much like a
natural language. :-)


More information about the Python-list mailing list