Commit 0e4a0434 authored by Stefan Behnel's avatar Stefan Behnel

fix Python level 'import as' of packages

parent dd5c9a50
......@@ -996,7 +996,8 @@ def p_import_statement(s):
else:
if as_name and "." in dotted_name:
name_list = ExprNodes.ListNode(pos, args = [
ExprNodes.StringNode(pos, value = EncodedString("*"))])
ExprNodes.IdentifierStringNode(
pos, value = EncodedString("*"))])
else:
name_list = None
stat = Nodes.SingleAssignmentNode(pos,
......
......@@ -2,6 +2,7 @@ __doc__ = u"""
>>> import sys as sous
>>> import distutils.core as corey
>>> from copy import deepcopy as copey
>>> import distutils.command as commie
>>> sous is _sous
True
......@@ -9,6 +10,8 @@ True
True
>>> copey is _copey
True
>>> _commie is commie
True
>>> _sous is not None
True
......@@ -16,6 +19,8 @@ True
True
>>> _copey is not None
True
>>> _commie is not None
True
>>> print(_sous.__name__)
sys
......@@ -29,8 +34,13 @@ distutils.core
deepcopy
>>> print(copey.__name__)
deepcopy
>>> print(_commie.__name__)
distutils.command
>>> print(commie.__name__)
distutils.command
"""
import sys as _sous
import distutils.core as _corey
from copy import deepcopy as _copey
import distutils.command as _commie
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