summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-04-19 16:59:16 (GMT)
committerGeorg Brandl <georg@python.org>2008-04-19 16:59:16 (GMT)
commit2fb8a53645e46cf9ab19b1e6c15c6666771c7905 (patch)
treeb3bfb492c8f3fef8f94051a0b9d2716deb0ae4a2
parentf801b0f04cf08d077f648febf4af1b7f94b81dd9 (diff)
downloadcpython-2fb8a53645e46cf9ab19b1e6c15c6666771c7905.zip
cpython-2fb8a53645e46cf9ab19b1e6c15c6666771c7905.tar.gz
cpython-2fb8a53645e46cf9ab19b1e6c15c6666771c7905.tar.bz2
#2631: clarify IMPORT_NAME semantics.
-rw-r--r--Doc/library/dis.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index d83ac3d..6d971f5 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -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)