Added index enties for the Python built-in functions, where appropriate.

This commit is contained in:
Fred Drake 1998-02-16 06:23:20 +00:00
parent e058b4f124
commit 53fb7723ee
2 changed files with 30 additions and 24 deletions

View file

@ -918,8 +918,9 @@ be created in this case).
\begin{cfuncdesc}{PyObject *}{PyImport_ImportModuleEx}{char *name, PyObject *globals, PyObject *locals, PyObject *fromlist} \begin{cfuncdesc}{PyObject *}{PyImport_ImportModuleEx}{char *name, PyObject *globals, PyObject *locals, PyObject *fromlist}
\strong{(NEW in 1.5a4!)} \strong{(NEW in 1.5a4!)}
Import a module. This is best described by referring to the built-in Import a module. This is best described by referring to the built-in
Python function \function{__import__()}, as the standard Python function \function{__import__()}\bifuncindex{__import__}, as
\function{__import__()} function calls this function directly. the standard \function{__import__()} function calls this function
directly.
The return value is a new reference to the imported module or The return value is a new reference to the imported module or
top-level package, or \NULL{} with an exception set on failure 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} \begin{cfuncdesc}{PyObject *}{PyImport_ReloadModule}{PyObject *m}
Reload a module. This is best described by referring to the built-in 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 \function{reload()} function calls this function directly. Return a
new reference to the reloaded module, or \NULL{} with an exception set new reference to the reloaded module, or \NULL{} with an exception set
on failure (the module still exists in this case). 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} \begin{cfuncdesc}{PyObject *}{PyImport_ExecCodeModule}{char *name, PyObject *co}
Given a module name (possibly of the form \code{package.module}) and a 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 code object read from a Python bytecode file or obtained from the
built-in function \function{compile()}, load the module. Return a new built-in function \function{compile()}\bifuncindex{compile}, load the
reference to the module object, or \NULL{} with an exception set module. Return a new reference to the module object, or \NULL{} with
if an error occurred (the module may still be created in this case). an exception set if an error occurred (the module may still be created
(This function would reload the module if it was already imported.) in this case). (This function would reload the module if it was
already imported.)
\end{cfuncdesc} \end{cfuncdesc}
\begin{cfuncdesc}{long}{PyImport_GetMagicNumber}{} \begin{cfuncdesc}{long}{PyImport_GetMagicNumber}{}
@ -1200,6 +1202,7 @@ This function always succeeds.
On success, returns a type object corresponding to the object On success, returns a type object corresponding to the object
type of object \var{o}. On failure, returns \NULL{}. This is type of object \var{o}. On failure, returns \NULL{}. This is
equivalent to the Python expression \samp{type(\var{o})}. equivalent to the Python expression \samp{type(\var{o})}.
\bifuncindex{type}
\end{cfuncdesc} \end{cfuncdesc}
\begin{cfuncdesc}{int}{PyObject_Length}{PyObject *o} \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} \begin{cfuncdesc}{PyObject*}{PyNumber_Divmod}{PyObject *o1, PyObject *o2}
See the built-in function \function{divmod()}. Returns \NULL{} on See the built-in function \function{divmod()}\bifuncindex{divmod}.
failure. This is the equivalent of the Python expression Returns \NULL{} on failure. This is the equivalent of the Python
\samp{divmod(\var{o1}, \var{o2})}. expression \samp{divmod(\var{o1}, \var{o2})}.
\end{cfuncdesc} \end{cfuncdesc}
\begin{cfuncdesc}{PyObject*}{PyNumber_Power}{PyObject *o1, PyObject *o2, PyObject *o3} \begin{cfuncdesc}{PyObject*}{PyNumber_Power}{PyObject *o1, PyObject *o2, PyObject *o3}
See the built-in function \function{pow()}. Returns \NULL{} on See the built-in function \function{pow()}\bifuncindex{pow}. Returns
failure. This is the equivalent of the Python expression \NULL{} on failure. This is the equivalent of the Python expression
\samp{pow(\var{o1}, \var{o2}, \var{o3})}, where \var{o3} is optional. \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. If \var{o3} is to be ignored, pass \code{Py_None} in its place.
\end{cfuncdesc} \end{cfuncdesc}

View file

@ -918,8 +918,9 @@ be created in this case).
\begin{cfuncdesc}{PyObject *}{PyImport_ImportModuleEx}{char *name, PyObject *globals, PyObject *locals, PyObject *fromlist} \begin{cfuncdesc}{PyObject *}{PyImport_ImportModuleEx}{char *name, PyObject *globals, PyObject *locals, PyObject *fromlist}
\strong{(NEW in 1.5a4!)} \strong{(NEW in 1.5a4!)}
Import a module. This is best described by referring to the built-in Import a module. This is best described by referring to the built-in
Python function \function{__import__()}, as the standard Python function \function{__import__()}\bifuncindex{__import__}, as
\function{__import__()} function calls this function directly. the standard \function{__import__()} function calls this function
directly.
The return value is a new reference to the imported module or The return value is a new reference to the imported module or
top-level package, or \NULL{} with an exception set on failure 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} \begin{cfuncdesc}{PyObject *}{PyImport_ReloadModule}{PyObject *m}
Reload a module. This is best described by referring to the built-in 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 \function{reload()} function calls this function directly. Return a
new reference to the reloaded module, or \NULL{} with an exception set new reference to the reloaded module, or \NULL{} with an exception set
on failure (the module still exists in this case). 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} \begin{cfuncdesc}{PyObject *}{PyImport_ExecCodeModule}{char *name, PyObject *co}
Given a module name (possibly of the form \code{package.module}) and a 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 code object read from a Python bytecode file or obtained from the
built-in function \function{compile()}, load the module. Return a new built-in function \function{compile()}\bifuncindex{compile}, load the
reference to the module object, or \NULL{} with an exception set module. Return a new reference to the module object, or \NULL{} with
if an error occurred (the module may still be created in this case). an exception set if an error occurred (the module may still be created
(This function would reload the module if it was already imported.) in this case). (This function would reload the module if it was
already imported.)
\end{cfuncdesc} \end{cfuncdesc}
\begin{cfuncdesc}{long}{PyImport_GetMagicNumber}{} \begin{cfuncdesc}{long}{PyImport_GetMagicNumber}{}
@ -1200,6 +1202,7 @@ This function always succeeds.
On success, returns a type object corresponding to the object On success, returns a type object corresponding to the object
type of object \var{o}. On failure, returns \NULL{}. This is type of object \var{o}. On failure, returns \NULL{}. This is
equivalent to the Python expression \samp{type(\var{o})}. equivalent to the Python expression \samp{type(\var{o})}.
\bifuncindex{type}
\end{cfuncdesc} \end{cfuncdesc}
\begin{cfuncdesc}{int}{PyObject_Length}{PyObject *o} \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} \begin{cfuncdesc}{PyObject*}{PyNumber_Divmod}{PyObject *o1, PyObject *o2}
See the built-in function \function{divmod()}. Returns \NULL{} on See the built-in function \function{divmod()}\bifuncindex{divmod}.
failure. This is the equivalent of the Python expression Returns \NULL{} on failure. This is the equivalent of the Python
\samp{divmod(\var{o1}, \var{o2})}. expression \samp{divmod(\var{o1}, \var{o2})}.
\end{cfuncdesc} \end{cfuncdesc}
\begin{cfuncdesc}{PyObject*}{PyNumber_Power}{PyObject *o1, PyObject *o2, PyObject *o3} \begin{cfuncdesc}{PyObject*}{PyNumber_Power}{PyObject *o1, PyObject *o2, PyObject *o3}
See the built-in function \function{pow()}. Returns \NULL{} on See the built-in function \function{pow()}\bifuncindex{pow}. Returns
failure. This is the equivalent of the Python expression \NULL{} on failure. This is the equivalent of the Python expression
\samp{pow(\var{o1}, \var{o2}, \var{o3})}, where \var{o3} is optional. \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. If \var{o3} is to be ignored, pass \code{Py_None} in its place.
\end{cfuncdesc} \end{cfuncdesc}