diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-04-12 06:49:00 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-04-12 06:49:00 (GMT) |
commit | 660cc77abb561233c30f375310cec67211e4bacb (patch) | |
tree | 7aa4c84d1d925ef9033652be58c0faaf12004f9c | |
parent | 364f9b9e2f798e4d28ed21122faffb030a6ccac5 (diff) | |
download | cpython-660cc77abb561233c30f375310cec67211e4bacb.zip cpython-660cc77abb561233c30f375310cec67211e4bacb.tar.gz cpython-660cc77abb561233c30f375310cec67211e4bacb.tar.bz2 |
Inside a class scope always use LOAD_NAME, STORE_NAME, DEL_NAME
-rw-r--r-- | Lib/compiler/pycodegen.py | 3 | ||||
-rw-r--r-- | Tools/compiler/compiler/pycodegen.py | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py index 2d4564a..444b065 100644 --- a/Lib/compiler/pycodegen.py +++ b/Lib/compiler/pycodegen.py @@ -1152,6 +1152,9 @@ class AbstractClassCode: if klass.doc: self.setDocstring(klass.doc) + def _nameOp(self, prefix, name): + self.emit(prefix + '_NAME', name) + def finish(self): self.graph.startExitBlock() self.emit('LOAD_LOCALS') diff --git a/Tools/compiler/compiler/pycodegen.py b/Tools/compiler/compiler/pycodegen.py index 2d4564a..444b065 100644 --- a/Tools/compiler/compiler/pycodegen.py +++ b/Tools/compiler/compiler/pycodegen.py @@ -1152,6 +1152,9 @@ class AbstractClassCode: if klass.doc: self.setDocstring(klass.doc) + def _nameOp(self, prefix, name): + self.emit(prefix + '_NAME', name) + def finish(self): self.graph.startExitBlock() self.emit('LOAD_LOCALS') |