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

adim at codespeak.net adim at codespeak.net
Thu Sep 8 12:58:07 CEST 2005


Author: adim
Date: Thu Sep  8 12:58:06 2005
New Revision: 17356

Modified:
   pypy/dist/pypy/interpreter/astcompiler/pyassem.py
   pypy/dist/pypy/interpreter/astcompiler/pycodegen.py
Log:
use getArgNames and getChildNodes rather than flatten methods


Modified: pypy/dist/pypy/interpreter/astcompiler/pyassem.py
==============================================================================
--- pypy/dist/pypy/interpreter/astcompiler/pyassem.py	(original)
+++ pypy/dist/pypy/interpreter/astcompiler/pyassem.py	Thu Sep  8 12:58:06 2005
@@ -834,7 +834,8 @@
     if args:
         for arg in args:
             if isinstance(arg, TupleArg):
-                numNames = len(misc.flatten(arg.names))
+                numNames = len(arg.names.getArgNames())
+                # numNames = len(misc.flatten(arg.names))
                 argcount = argcount - numNames
     return argcount
 

Modified: pypy/dist/pypy/interpreter/astcompiler/pycodegen.py
==============================================================================
--- pypy/dist/pypy/interpreter/astcompiler/pycodegen.py	(original)
+++ pypy/dist/pypy/interpreter/astcompiler/pycodegen.py	Thu Sep  8 12:58:06 2005
@@ -1315,7 +1315,7 @@
             args.append(elt)
         elif isinstance(elt, ast.AssTuple):
             args.append(TupleArg(i * 2, elt))
-            extra.extend(ast.flatten(elt))
+            extra.extend(elt.getChildNodes())
             count = count + 1
         else:
             raise ValueError( "unexpect argument type: %s" % elt )



More information about the Pypy-commit mailing list