power of explicit self?

John Roth johnroth1 at gmail.com
Sat Dec 12 09:35:32 EST 2009


On Dec 11, 9:04 pm, Fire Crow <m... at firecrow.com> wrote:
> 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.
>
> 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.
>
> all help welcome

It's not implemented in the compiler. There's a place in the runtime
for invoking a method where the object is inserted at the beginning
of the parameter list. IIRC, that's done by wrapping the function
object.

John Roth



More information about the Python-list mailing list