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

benjamin at codespeak.net benjamin at codespeak.net
Sat Jul 18 21:52:16 CEST 2009


Author: benjamin
Date: Sat Jul 18 21:52:15 2009
New Revision: 66390

Modified:
   pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py
Log:
fix annotation hints

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:52:15 2009
@@ -587,8 +587,9 @@
         else:
             mod_name = ""
         self.emit_op_name(ops.IMPORT_NAME, self.names, mod_name)
-        if len(imp.names) == 1 and isinstance(imp.names[0], ast.alias) and \
-                imp.names[0].name == "*":
+        first = imp.names[0]
+        assert isinstance(first, ast.alias)
+        if len(imp.names) == 1 and first.name == "*":
             self.emit_op(ops.IMPORT_STAR)
         else:
             for alias in imp.names:



More information about the Pypy-commit mailing list