[pypy-svn] r32648 - pypy/dist/pypy/interpreter/astcompiler

pedronis at codespeak.net pedronis at codespeak.net
Tue Sep 26 13:35:36 CEST 2006


Author: pedronis
Date: Tue Sep 26 13:35:32 2006
New Revision: 32648

Modified:
   pypy/dist/pypy/interpreter/astcompiler/ast.py
   pypy/dist/pypy/interpreter/astcompiler/astgen.py
Log:
make Node and Expression also not subclassable.



Modified: pypy/dist/pypy/interpreter/astcompiler/ast.py
==============================================================================
--- pypy/dist/pypy/interpreter/astcompiler/ast.py	(original)
+++ pypy/dist/pypy/interpreter/astcompiler/ast.py	Tue Sep 26 13:35:32 2006
@@ -91,6 +91,7 @@
                        filename = interp_attrproperty('filename', cls=Node),
                        )
 
+Node.typedef.acceptable_as_base_class = False
         
 class EmptyNode(Node):
     def accept(self, visitor):
@@ -152,8 +153,8 @@
                      mutate=interp2app(descr_expression_mutate, unwrap_spec=[ObjSpace, W_Root, W_Root] ),
                      node=GetSetProperty(Expression.fget_node, Expression.fset_node ),
                     )
-                    
 
+Expression.typedef.acceptable_as_base_class = False
 
 
 class AbstractFunction(Node):

Modified: pypy/dist/pypy/interpreter/astcompiler/astgen.py
==============================================================================
--- pypy/dist/pypy/interpreter/astcompiler/astgen.py	(original)
+++ pypy/dist/pypy/interpreter/astcompiler/astgen.py	Tue Sep 26 13:35:32 2006
@@ -733,6 +733,7 @@
                        filename = interp_attrproperty('filename', cls=Node),
                        )
 
+Node.typedef.acceptable_as_base_class = False
         
 class EmptyNode(Node):
     def accept(self, visitor):
@@ -794,8 +795,8 @@
                      mutate=interp2app(descr_expression_mutate, unwrap_spec=[ObjSpace, W_Root, W_Root] ),
                      node=GetSetProperty(Expression.fget_node, Expression.fset_node ),
                     )
-                    
 
+Expression.typedef.acceptable_as_base_class = False
 '''
 
 epilogue = '''



More information about the Pypy-commit mailing list