Westley Martínez <aniko...@gmail.com> Wrote in message:
> 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.
> 

I couldn't tell you the history,  but I can say it makes sense to
 me. In c++, this is a pointer,  and the name this seems
 reasonable.  But in python it's a reference,  a reference to
 myself. 

-- 
DaveA

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to