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
6bba98ab
Commit
6bba98ab
authored
Feb 16, 1998
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added index enties for the Python built-in functions, where appropriate.
parent
263d1256
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
24 deletions
+30
-24
Doc/api.tex
Doc/api.tex
+15
-12
Doc/api/api.tex
Doc/api/api.tex
+15
-12
No files found.
Doc/api.tex
View file @
6bba98ab
...
...
@@ -918,8 +918,9 @@ be created in this case).
\begin{cfuncdesc}
{
PyObject *
}{
PyImport
_
ImportModuleEx
}{
char *name, PyObject *globals, PyObject *locals, PyObject *fromlist
}
\strong
{
(NEW in 1.5a4!)
}
Import a module. This is best described by referring to the built-in
Python function
\function
{__
import
__
()
}
, as the standard
\function
{__
import
__
()
}
function calls this function directly.
Python function
\function
{__
import
__
()
}
\bifuncindex
{__
import
__}
, as
the standard
\function
{__
import
__
()
}
function calls this function
directly.
The return value is a new reference to the imported module or
top-level package, or
\NULL
{}
with an exception set on failure
...
...
@@ -939,7 +940,7 @@ current environment, e.g. by \module{rexec} or \module{ihooks}.
\begin{cfuncdesc}
{
PyObject *
}{
PyImport
_
ReloadModule
}{
PyObject *m
}
Reload a module. This is best described by referring to the built-in
Python function
\function
{
reload()
}
, as the standard
Python function
\function
{
reload()
}
\bifuncindex
{
reload
}
, as the standard
\function
{
reload()
}
function calls this function directly. Return a
new reference to the reloaded module, or
\NULL
{}
with an exception set
on failure (the module still exists in this case).
...
...
@@ -958,10 +959,11 @@ exception set on failure.
\begin{cfuncdesc}
{
PyObject *
}{
PyImport
_
ExecCodeModule
}{
char *name, PyObject *co
}
Given a module name (possibly of the form
\code
{
package.module
}
) and a
code object read from a Python bytecode file or obtained from the
built-in function
\function
{
compile()
}
, load the module. Return a new
reference to the module object, or
\NULL
{}
with an exception set
if an error occurred (the module may still be created in this case).
(This function would reload the module if it was already imported.)
built-in function
\function
{
compile()
}
\bifuncindex
{
compile
}
, load the
module. Return a new reference to the module object, or
\NULL
{}
with
an exception set if an error occurred (the module may still be created
in this case). (This function would reload the module if it was
already imported.)
\end{cfuncdesc}
\begin{cfuncdesc}
{
long
}{
PyImport
_
GetMagicNumber
}{}
...
...
@@ -1200,6 +1202,7 @@ This function always succeeds.
On success, returns a type object corresponding to the object
type of object
\var
{
o
}
. On failure, returns
\NULL
{}
. This is
equivalent to the Python expression
\samp
{
type(
\var
{
o
}
)
}
.
\bifuncindex
{
type
}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyObject
_
Length
}{
PyObject *o
}
...
...
@@ -1277,15 +1280,15 @@ failure. This is the equivalent of the Python expression
\begin{cfuncdesc}
{
PyObject*
}{
PyNumber
_
Divmod
}{
PyObject *o1, PyObject *o2
}
See the built-in function
\function
{
divmod()
}
. Returns
\NULL
{}
on
failure. This is the equivalent of the Python expressi
on
\samp
{
divmod(
\var
{
o1
}
,
\var
{
o2
}
)
}
.
See the built-in function
\function
{
divmod()
}
\bifuncindex
{
divmod
}
.
Returns
\NULL
{}
on failure. This is the equivalent of the Pyth
on
expression
\samp
{
divmod(
\var
{
o1
}
,
\var
{
o2
}
)
}
.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyNumber
_
Power
}{
PyObject *o1, PyObject *o2, PyObject *o3
}
See the built-in function
\function
{
pow()
}
. Returns
\NULL
{}
on
failure. This is the equivalent of the Python expression
See the built-in function
\function
{
pow()
}
\bifuncindex
{
pow
}
. Returns
\NULL
{}
on
failure. This is the equivalent of the Python expression
\samp
{
pow(
\var
{
o1
}
,
\var
{
o2
}
,
\var
{
o3
}
)
}
, where
\var
{
o3
}
is optional.
If
\var
{
o3
}
is to be ignored, pass
\code
{
Py
_
None
}
in its place.
\end{cfuncdesc}
...
...
Doc/api/api.tex
View file @
6bba98ab
...
...
@@ -918,8 +918,9 @@ be created in this case).
\begin{cfuncdesc}
{
PyObject *
}{
PyImport
_
ImportModuleEx
}{
char *name, PyObject *globals, PyObject *locals, PyObject *fromlist
}
\strong
{
(NEW in 1.5a4!)
}
Import a module. This is best described by referring to the built-in
Python function
\function
{__
import
__
()
}
, as the standard
\function
{__
import
__
()
}
function calls this function directly.
Python function
\function
{__
import
__
()
}
\bifuncindex
{__
import
__}
, as
the standard
\function
{__
import
__
()
}
function calls this function
directly.
The return value is a new reference to the imported module or
top-level package, or
\NULL
{}
with an exception set on failure
...
...
@@ -939,7 +940,7 @@ current environment, e.g. by \module{rexec} or \module{ihooks}.
\begin{cfuncdesc}
{
PyObject *
}{
PyImport
_
ReloadModule
}{
PyObject *m
}
Reload a module. This is best described by referring to the built-in
Python function
\function
{
reload()
}
, as the standard
Python function
\function
{
reload()
}
\bifuncindex
{
reload
}
, as the standard
\function
{
reload()
}
function calls this function directly. Return a
new reference to the reloaded module, or
\NULL
{}
with an exception set
on failure (the module still exists in this case).
...
...
@@ -958,10 +959,11 @@ exception set on failure.
\begin{cfuncdesc}
{
PyObject *
}{
PyImport
_
ExecCodeModule
}{
char *name, PyObject *co
}
Given a module name (possibly of the form
\code
{
package.module
}
) and a
code object read from a Python bytecode file or obtained from the
built-in function
\function
{
compile()
}
, load the module. Return a new
reference to the module object, or
\NULL
{}
with an exception set
if an error occurred (the module may still be created in this case).
(This function would reload the module if it was already imported.)
built-in function
\function
{
compile()
}
\bifuncindex
{
compile
}
, load the
module. Return a new reference to the module object, or
\NULL
{}
with
an exception set if an error occurred (the module may still be created
in this case). (This function would reload the module if it was
already imported.)
\end{cfuncdesc}
\begin{cfuncdesc}
{
long
}{
PyImport
_
GetMagicNumber
}{}
...
...
@@ -1200,6 +1202,7 @@ This function always succeeds.
On success, returns a type object corresponding to the object
type of object
\var
{
o
}
. On failure, returns
\NULL
{}
. This is
equivalent to the Python expression
\samp
{
type(
\var
{
o
}
)
}
.
\bifuncindex
{
type
}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyObject
_
Length
}{
PyObject *o
}
...
...
@@ -1277,15 +1280,15 @@ failure. This is the equivalent of the Python expression
\begin{cfuncdesc}
{
PyObject*
}{
PyNumber
_
Divmod
}{
PyObject *o1, PyObject *o2
}
See the built-in function
\function
{
divmod()
}
. Returns
\NULL
{}
on
failure. This is the equivalent of the Python expressi
on
\samp
{
divmod(
\var
{
o1
}
,
\var
{
o2
}
)
}
.
See the built-in function
\function
{
divmod()
}
\bifuncindex
{
divmod
}
.
Returns
\NULL
{}
on failure. This is the equivalent of the Pyth
on
expression
\samp
{
divmod(
\var
{
o1
}
,
\var
{
o2
}
)
}
.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyNumber
_
Power
}{
PyObject *o1, PyObject *o2, PyObject *o3
}
See the built-in function
\function
{
pow()
}
. Returns
\NULL
{}
on
failure. This is the equivalent of the Python expression
See the built-in function
\function
{
pow()
}
\bifuncindex
{
pow
}
. Returns
\NULL
{}
on
failure. This is the equivalent of the Python expression
\samp
{
pow(
\var
{
o1
}
,
\var
{
o2
}
,
\var
{
o3
}
)
}
, where
\var
{
o3
}
is optional.
If
\var
{
o3
}
is to be ignored, pass
\code
{
Py
_
None
}
in its place.
\end{cfuncdesc}
...
...
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