From 660cc77abb561233c30f375310cec67211e4bacb Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 12 Apr 2001 06:49:00 +0000 Subject: [PATCH] Inside a class scope always use LOAD_NAME, STORE_NAME, DEL_NAME --- Lib/compiler/pycodegen.py | 3 +++ Tools/compiler/compiler/pycodegen.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py index 2d4564a6340..444b0653886 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 2d4564a6340..444b0653886 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')