[Python-Dev] Draft proposal: Implicit self in Python 3.0 (original) (raw)
Fredrik Lundh fredrik at pythonware.com
Sun Jan 8 16:49:36 CET 2006
- Previous message: [Python-Dev] Draft proposal: Implicit self in Python 3.0
- Next message: [Python-Dev] Draft proposal: Implicit self in Python 3.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 ?
- Previous message: [Python-Dev] Draft proposal: Implicit self in Python 3.0
- Next message: [Python-Dev] Draft proposal: Implicit self in Python 3.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]