Why the 'self' argument?

Terry Reedy tjreedy at udel.edu
Sun Sep 7 04:06:01 EDT 2003


"Jonathan Aquino" <Jon_Aquino at shaw.ca> wrote in message
news:fc08a59c.0309062203.56904149 at posting.google.com...
> , I'm simply uncomfortable  when I see(2) the number of
> things  between the parentheses being different for the method
>  declaration and the method call.

If this bothers you enough, and you have a simple class without
inheritance, you *can* write the call in its full form
'class.meth(inst, a, b, ...)' so that you *do* have the same number of
things in declaration and call.  Then revert to the shorter form when
comfortable.  I am beginning to think methods calls should be taught
this way.

Terry J. Reedy






More information about the Python-list mailing list