Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
70c1c120
Commit
70c1c120
authored
Aug 27, 2000
by
Thomas Wouters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-allow 'import mod.submod as s', and change its meaning to what it should
mean; the same as 'from mod import submod as s'.
parent
08504825
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Python/compile.c
Python/compile.c
+5
-2
No files found.
Python/compile.c
View file @
70c1c120
...
...
@@ -2354,12 +2354,15 @@ com_import_stmt(struct compiling *c, node *n)
com_addopname
(
c
,
IMPORT_NAME
,
CHILD
(
subn
,
0
));
com_push
(
c
,
1
);
if
(
NCH
(
subn
)
>
1
)
{
i
f
(
strcmp
(
STR
(
CHILD
(
subn
,
1
)),
"as"
)
!=
0
||
NCH
(
CHILD
(
subn
,
0
))
>
1
)
{
i
nt
j
;
if
(
strcmp
(
STR
(
CHILD
(
subn
,
1
)),
"as"
)
!=
0
)
{
com_error
(
c
,
PyExc_SyntaxError
,
"invalid syntax"
);
return
;
}
for
(
j
=
2
;
j
<
NCH
(
CHILD
(
subn
,
0
));
j
+=
2
)
com_addopname
(
c
,
LOAD_ATTR
,
CHILD
(
CHILD
(
subn
,
0
),
j
));
com_addopname
(
c
,
STORE_NAME
,
CHILD
(
subn
,
2
));
}
else
com_addopname
(
c
,
STORE_NAME
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment