Kaydet (Commit) 05522ad7 authored tarafından Michael W. Hudson's avatar Michael W. Hudson

Fix bug

[ 1057835 ] compiler.transformer, "from module import *"
üst 481b09b3
...@@ -437,8 +437,8 @@ class Transformer: ...@@ -437,8 +437,8 @@ class Transformer:
assert nodelist[2][1] == 'import' assert nodelist[2][1] == 'import'
fromname = self.com_dotted_name(nodelist[1]) fromname = self.com_dotted_name(nodelist[1])
if nodelist[3][0] == token.STAR: if nodelist[3][0] == token.STAR:
# TODO(jhylton): where is the lineno? return From(fromname, [('*', None)],
return From(fromname, [('*', None)]) lineno=nodelist[0][2])
else: else:
node = nodelist[3 + (nodelist[3][0] == token.LPAR)] node = nodelist[3 + (nodelist[3][0] == token.LPAR)]
return From(fromname, self.com_import_as_names(node), return From(fromname, self.com_import_as_names(node),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment