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
634ea504
Commit
634ea504
authored
Jun 10, 1999
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust indexing for __import__(); based on comments by Stefan Franke
<sfranke@cdc-group.com>.
parent
82716ec9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
Doc/lib/libfuncs.tex
Doc/lib/libfuncs.tex
+11
-12
No files found.
Doc/lib/libfuncs.tex
View file @
634ea504
...
...
@@ -7,18 +7,17 @@ are always available. They are listed here in alphabetical order.
\setindexsubitem
{
(built-in function)
}
\begin{funcdesc}
{__
import
__}{
name
\optional
{
, globals
\optional
{
, locals
\optional
{
, fromlist
}}}}
This function is invoked by the
\keyword
{
import
}
statement. It
mainly exists so that you can replace it with another
function that has a compatible interface, in order to change the
semantics of the
\keyword
{
import
}
statement. For examples of why and
how you would do this, see the standard library modules
\module
{
ihooks
}
and
\module
{
rexec
}
. See also the built-in module
\module
{
imp
}
, which defines some useful operations out of which you can
build your own
\function
{__
import
__
()
}
function.
\stindex
{
import
}
\refstmodindex
{
ihooks
}
\refstmodindex
{
rexec
}
\refbimodindex
{
imp
}
This function is invoked by the
\keyword
{
import
}
\stindex
{
import
}
statement. It mainly
exists so that you can replace it with another function that has a
compatible interface, in order to change the semantics of the
\keyword
{
import
}
statement. For examples of why and how you would do
this, see the standard library modules
\module
{
ihooks
}
\refstmodindex
{
ihooks
}
and
\refmodule
{
rexec
}
\refstmodindex
{
rexec
}
. See also the built-in module
\refmodule
{
imp
}
\refbimodindex
{
imp
}
, which defines some useful
operations out of which you can build your own
\function
{__
import
__
()
}
function.
For example, the statement `
\code
{
import
}
\code
{
spam
}
' results in the
following call:
...
...
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