Fernando M. <[EMAIL PROTECTED]> wrote: >i was just wondering about the need to put "self" as the first >parameter in every method a class has because, if it's always needed, >why the obligation to write it? couldn't it be implicit?
Didn't this exact question get asked just a few days ago? Anyway, the short answer is: 1) Yes, it's always needed. 2) It's part of the Python design philosophy that "explicit is better than implicit". Note that in languages like C++ where using "this->" is optional, people invent their own conventions for keeping local and instance variables distinct, like prepending m_ to member names (except that different people do it different ways, so it's more confusing). -- http://mail.python.org/mailman/listinfo/python-list