[pypy-svn] r66388 - pypy/branch/parser-compiler/pypy/interpreter/astcompiler

benjamin at codespeak.net benjamin at codespeak.net
Sat Jul 18 21:36:32 CEST 2009


Author: benjamin
Date: Sat Jul 18 21:36:31 2009
New Revision: 66388

Modified:
   pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py
Log:
help the annotator for alias

Modified: pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py
==============================================================================
--- pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py	(original)
+++ pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py	Sat Jul 18 21:36:31 2009
@@ -587,7 +587,8 @@
         else:
             mod_name = ""
         self.emit_op_name(ops.IMPORT_NAME, self.names, mod_name)
-        if len(imp.names) == 1 and imp.names[0].name == "*":
+        if len(imp.names) == 1 and isinstance(imp.names[0], ast.alias) and \
+                imp.names[0].name == "*":
             self.emit_op(ops.IMPORT_STAR)
         else:
             for alias in imp.names:



More information about the Pypy-commit mailing list