From 2fb8a53645e46cf9ab19b1e6c15c6666771c7905 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 19 Apr 2008 16:59:16 +0000 Subject: [PATCH] #2631: clarify IMPORT_NAME semantics. --- Doc/library/dis.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index d83ac3d98d..6d971f5a9f 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) -- 2.50.1