mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Fix SF bug #116263: support for from .. import *
transformer.py: return '*', None from com_import_as_name pycodegen.py: special case for name == '*' pyassem.py: fix stack counting for IMPORT_ opcodes
This commit is contained in:
parent
babe326c65
commit
4e1be72e6b
6 changed files with 26 additions and 8 deletions
|
@ -825,6 +825,8 @@ class Transformer:
|
|||
return dot, node[3][1]
|
||||
|
||||
def com_import_as_name(self, node):
|
||||
if node == '*':
|
||||
return '*', None
|
||||
if node[0] == token.NAME:
|
||||
return node[1], None
|
||||
assert len(node) == 4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue