> I'm trying to make the transition from Java

> The biggest thing that was messing me up was the
> mandatory "self" input. For some reason I was thinking
> that, if I had parenthesis, I would have to define it.

I think things are pretty similar in Java.  Java does the same thing
except 'self' is invisible in Java, and in Java 'self' is called
'this'.  For instance, in Java you can write:

int num;

void setNum(int num)
{
      this->num = num
}

Where did 'this' come from?  In Java, methods are passed the invisible
'this' argument, which you can then access inside the method.  It
looks like Python just "uncloaks" Java's 'this'.


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

Reply via email to