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

pedronis at codespeak.net pedronis at codespeak.net
Thu Sep 8 19:46:32 CEST 2005


Author: pedronis
Date: Thu Sep  8 19:46:31 2005
New Revision: 17389

Modified:
   pypy/dist/pypy/interpreter/astcompiler/symbols.py
Log:
removed the __super_init idiom in symbols.py too



Modified: pypy/dist/pypy/interpreter/astcompiler/symbols.py
==============================================================================
--- pypy/dist/pypy/interpreter/astcompiler/symbols.py	(original)
+++ pypy/dist/pypy/interpreter/astcompiler/symbols.py	Thu Sep  8 19:46:31 2005
@@ -173,23 +173,20 @@
         return self.cells.keys()
 
 class ModuleScope(Scope):
-    __super_init = Scope.__init__
 
     def __init__(self):
-        self.__super_init("global", self)
+        Scope.__init__(self, "global", self)
 
 class FunctionScope(Scope):
     pass
 
 class GenExprScope(Scope):
-    __super_init = Scope.__init__
-
     __counter = 1
 
     def __init__(self, module, klass=None):
         i = self.__counter
         self.__counter += 1
-        self.__super_init("generator expression<%d>"%i, module, klass)
+        Scope.__init__(self, "generator expression<%d>"%i, module, klass)
         self.add_param('[outmost-iterable]')
 
     def get_names(self):
@@ -197,20 +194,17 @@
         return keys
 
 class LambdaScope(FunctionScope):
-    __super_init = Scope.__init__
-
     __counter = 1
 
     def __init__(self, module, klass=None):
         i = self.__counter
         self.__counter += 1
-        self.__super_init("lambda.%d" % i, module, klass)
+        Scope.__init__(self, "lambda.%d" % i, module, klass)
 
 class ClassScope(Scope):
-    __super_init = Scope.__init__
 
     def __init__(self, name, module):
-        self.__super_init(name, module, name)
+        Scope.__init__(self, name, module, name)
 
 class SymbolVisitor(ast.ASTVisitor):
     def __init__(self, space):



More information about the Pypy-commit mailing list