Author: Carl Friedrich Bolz <cfb...@gmx.de>
Branch: faster-nested-scopes
Changeset: r45650:ccb04f0a55e9
Date: 2011-07-15 19:33 +0200
http://bitbucket.org/pypy/pypy/changeset/ccb04f0a55e9/

Log:    make Cell.w_value quasi-immutable. This is useful for inner
        functions that survive their defining scope.

diff --git a/pypy/interpreter/nestedscope.py b/pypy/interpreter/nestedscope.py
--- a/pypy/interpreter/nestedscope.py
+++ b/pypy/interpreter/nestedscope.py
@@ -8,7 +8,8 @@
 
 class Cell(Wrappable):
     "A simple container for a wrapped value."
-    
+    _immutable_fields_ = ["w_value?"]
+
     def __init__(self, w_value=None):
         self.w_value = w_value
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to