power of explicit self?
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Sat Dec 12 00:53:13 EST 2009
En Sat, 12 Dec 2009 01:04:42 -0300, Fire Crow <me at firecrow.com> escribió:
> I'm looking for an explanation of how explicit self is implimented and
> what features are only possible because of, or are greatly improved,
> because of it. I've always liked explicit self and am looking for the
> computer science behind it, so that I can explain the benefits that I
> see.
See the FAQ [1]
> I'm also interested in the files/lines of the python source that shows
> how explicit self is implemented if anyone can point out where that
> takes place.
Nowhere, I'd say. An *implicit* self would have to be implemented
somewhere in the compiler -- but an explicit self doesn't. It's
homogeneous, always name-dot-attribute; the name 'self' is not special at
all.
[1]
http://www.python.org/doc/faq/general/#why-must-self-be-used-explicitly-in-method-definitions-and-calls
--
Gabriel Genellina
More information about the Python-list
mailing list