What is "self"?
Roy Smith
roy at panix.com
Fri Sep 23 07:46:19 EDT 2005
Ron Adam <rrr at ronadam.com> wrote:
> You can actually call it anything you want but "self" is sort of a
> tradition.
That's true, but I think needs to be said a bit more emphatically. There's
no reason to call it anything other than "self" and a newcomer to the
language would be well advised to not try and be creative here. Using
"self" is virtually universal, and calling it anything else will just lead
to confusion by other people who have to read your code.
More information about the Python-list
mailing list