Inside a class scope always use LOAD_NAME, STORE_NAME, DEL_NAME

This commit is contained in:
Jeremy Hylton 2001-04-12 06:49:00 +00:00
parent 364f9b9e2f
commit 660cc77abb
2 changed files with 6 additions and 0 deletions

View File

@ -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')

View File

@ -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')