summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/compiler/pycodegen.py3
-rw-r--r--Tools/compiler/compiler/pycodegen.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py
index 444b065..c0bbed3 100644
--- a/Lib/compiler/pycodegen.py
+++ b/Lib/compiler/pycodegen.py
@@ -1117,7 +1117,7 @@ class AbstractFunctionCode:
if type(elt) == types.TupleType:
self.unpackSequence(elt)
else:
- self.emit('STORE_FAST', elt)
+ self._nameOp('STORE', elt)
unpackTuple = unpackSequence
@@ -1153,6 +1153,7 @@ class AbstractClassCode:
self.setDocstring(klass.doc)
def _nameOp(self, prefix, name):
+ # Class namespaces are always unoptimized
self.emit(prefix + '_NAME', name)
def finish(self):
diff --git a/Tools/compiler/compiler/pycodegen.py b/Tools/compiler/compiler/pycodegen.py
index 444b065..c0bbed3 100644
--- a/Tools/compiler/compiler/pycodegen.py
+++ b/Tools/compiler/compiler/pycodegen.py
@@ -1117,7 +1117,7 @@ class AbstractFunctionCode:
if type(elt) == types.TupleType:
self.unpackSequence(elt)
else:
- self.emit('STORE_FAST', elt)
+ self._nameOp('STORE', elt)
unpackTuple = unpackSequence
@@ -1153,6 +1153,7 @@ class AbstractClassCode:
self.setDocstring(klass.doc)
def _nameOp(self, prefix, name):
+ # Class namespaces are always unoptimized
self.emit(prefix + '_NAME', name)
def finish(self):