mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
#2631: clarify IMPORT_NAME semantics.
This commit is contained in:
parent
f801b0f04c
commit
2fb8a53645
1 changed files with 5 additions and 3 deletions
|
@ -630,9 +630,11 @@ the more significant byte last.
|
|||
|
||||
.. opcode:: IMPORT_NAME (namei)
|
||||
|
||||
Imports the module ``co_names[namei]``. The module object is pushed onto the
|
||||
stack. The current namespace is not affected: for a proper import statement, a
|
||||
subsequent ``STORE_FAST`` instruction modifies the namespace.
|
||||
Imports the module ``co_names[namei]``. TOS and TOS1 are popped and provide
|
||||
the *fromlist* and *level* arguments of :func:`__import__`. The module
|
||||
object is pushed onto the stack. The current namespace is not affected:
|
||||
for a proper import statement, a subsequent ``STORE_FAST`` instruction
|
||||
modifies the namespace.
|
||||
|
||||
|
||||
.. opcode:: IMPORT_FROM (namei)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue