mirror of https://github.com/python/cpython
Adjust indexing for __import__(); based on comments by Stefan Franke
<sfranke@cdc-group.com>.
This commit is contained in:
parent
28b1770521
commit
697c779d98
|
@ -7,18 +7,17 @@ are always available. They are listed here in alphabetical order.
|
||||||
\setindexsubitem{(built-in function)}
|
\setindexsubitem{(built-in function)}
|
||||||
|
|
||||||
\begin{funcdesc}{__import__}{name\optional{, globals\optional{, locals\optional{, fromlist}}}}
|
\begin{funcdesc}{__import__}{name\optional{, globals\optional{, locals\optional{, fromlist}}}}
|
||||||
This function is invoked by the \keyword{import} statement. It
|
This function is invoked by the
|
||||||
mainly exists so that you can replace it with another
|
\keyword{import}\stindex{import} statement. It mainly
|
||||||
function that has a compatible interface, in order to change the
|
exists so that you can replace it with another function that has a
|
||||||
semantics of the \keyword{import} statement. For examples of why and
|
compatible interface, in order to change the semantics of the
|
||||||
how you would do this, see the standard library modules
|
\keyword{import} statement. For examples of why and how you would do
|
||||||
\module{ihooks} and \module{rexec}. See also the built-in module
|
this, see the standard library modules
|
||||||
\module{imp}, which defines some useful operations out of which you can
|
\module{ihooks}\refstmodindex{ihooks} and
|
||||||
build your own \function{__import__()} function.
|
\refmodule{rexec}\refstmodindex{rexec}. See also the built-in module
|
||||||
\stindex{import}
|
\refmodule{imp}\refbimodindex{imp}, which defines some useful
|
||||||
\refstmodindex{ihooks}
|
operations out of which you can build your own
|
||||||
\refstmodindex{rexec}
|
\function{__import__()} function.
|
||||||
\refbimodindex{imp}
|
|
||||||
|
|
||||||
For example, the statement `\code{import} \code{spam}' results in the
|
For example, the statement `\code{import} \code{spam}' results in the
|
||||||
following call:
|
following call:
|
||||||
|
|
Loading…
Reference in New Issue