[Python-Dev] Draft proposal: Implicit self in Python 3.0

Fredrik Lundh fredrik at pythonware.com
Sun Jan 8 16:49:36 CET 2006


Ralf W. Grosse-Kunstleve wrote:

> > what dictionary lookup ?
>
> IIUC, "self" is first looked up in the local dictionary.

no, self is a local variable.  self.x means that "x" is looked up in the in-
stance dictionary, though.

> Please try the code below to see the performance impact.

oh, please.  do you seriously think that if you don't have to type "self"
yourself, Python will suddenly be able to turn all instance variables into
local function variables without any performance overhead ?

</F>





More information about the Python-Dev mailing list