Commit 580eb260 authored by Fred Drake's avatar Fred Drake

Logical markup, a couple of index entries.

parent 2c954fa4
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
\setindexsubitem{(in module types)} \setindexsubitem{(in module types)}
This module defines names for all object types that are used by the This module defines names for all object types that are used by the
standard Python interpreter (but not for the types defined by various standard Python interpreter, but not for the types defined by various
extension modules). It is safe to use ``\code{from types import *}'' --- extension modules. It is safe to use \samp{from types import *} ---
the module does not export any other names besides the ones listed the module does not export any names besides the ones listed here.
here. New names exported by future versions of this module will New names exported by future versions of this module will all end in
all end in \code{Type}. \samp{Type}.
Typical use is for functions that do different things depending on Typical use is for functions that do different things depending on
their argument types, like the following: their argument types, like the following:
...@@ -22,7 +22,7 @@ def delete(list, item): ...@@ -22,7 +22,7 @@ def delete(list, item):
else: else:
list.remove(item) list.remove(item)
\end{verbatim} \end{verbatim}
%
The module defines the following names: The module defines the following names:
\begin{datadesc}{NoneType} \begin{datadesc}{NoneType}
...@@ -30,7 +30,8 @@ The type of \code{None}. ...@@ -30,7 +30,8 @@ The type of \code{None}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{TypeType} \begin{datadesc}{TypeType}
The type of type objects (such as returned by \code{type()}). The type of type objects (such as returned by
\function{type()}\bifuncindex{type}).
\end{datadesc} \end{datadesc}
\begin{datadesc}{IntType} \begin{datadesc}{IntType}
...@@ -70,11 +71,12 @@ The type of user-defined functions and lambdas. ...@@ -70,11 +71,12 @@ The type of user-defined functions and lambdas.
\end{datadesc} \end{datadesc}
\begin{datadesc}{LambdaType} \begin{datadesc}{LambdaType}
An alternative name for \code{FunctionType}. An alternative name for \code{FunctionType}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{CodeType} \begin{datadesc}{CodeType}
The type for code objects such as returned by \code{compile()}. The type for code objects such as returned by
\function{compile()}\bifuncindex{compile}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{ClassType} \begin{datadesc}{ClassType}
...@@ -94,7 +96,8 @@ An alternative name for \code{MethodType}. ...@@ -94,7 +96,8 @@ An alternative name for \code{MethodType}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{BuiltinFunctionType} \begin{datadesc}{BuiltinFunctionType}
The type of built-in functions like \code{len} or \code{sys.exit}. The type of built-in functions like \function{len()} or
\function{sys.exit()}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{BuiltinMethodType} \begin{datadesc}{BuiltinMethodType}
...@@ -110,11 +113,13 @@ The type of open file objects such as \code{sys.stdout}. ...@@ -110,11 +113,13 @@ The type of open file objects such as \code{sys.stdout}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{XRangeType} \begin{datadesc}{XRangeType}
The type of range objects returned by \code{xrange()}. The type of range objects returned by
\function{xrange()}\bifuncindex{xrange}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{TracebackType} \begin{datadesc}{TracebackType}
The type of traceback objects such as found in \code{sys.exc_traceback}. The type of traceback objects such as found in
\code{sys.exc_traceback}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{FrameType} \begin{datadesc}{FrameType}
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
\setindexsubitem{(in module types)} \setindexsubitem{(in module types)}
This module defines names for all object types that are used by the This module defines names for all object types that are used by the
standard Python interpreter (but not for the types defined by various standard Python interpreter, but not for the types defined by various
extension modules). It is safe to use ``\code{from types import *}'' --- extension modules. It is safe to use \samp{from types import *} ---
the module does not export any other names besides the ones listed the module does not export any names besides the ones listed here.
here. New names exported by future versions of this module will New names exported by future versions of this module will all end in
all end in \code{Type}. \samp{Type}.
Typical use is for functions that do different things depending on Typical use is for functions that do different things depending on
their argument types, like the following: their argument types, like the following:
...@@ -22,7 +22,7 @@ def delete(list, item): ...@@ -22,7 +22,7 @@ def delete(list, item):
else: else:
list.remove(item) list.remove(item)
\end{verbatim} \end{verbatim}
%
The module defines the following names: The module defines the following names:
\begin{datadesc}{NoneType} \begin{datadesc}{NoneType}
...@@ -30,7 +30,8 @@ The type of \code{None}. ...@@ -30,7 +30,8 @@ The type of \code{None}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{TypeType} \begin{datadesc}{TypeType}
The type of type objects (such as returned by \code{type()}). The type of type objects (such as returned by
\function{type()}\bifuncindex{type}).
\end{datadesc} \end{datadesc}
\begin{datadesc}{IntType} \begin{datadesc}{IntType}
...@@ -70,11 +71,12 @@ The type of user-defined functions and lambdas. ...@@ -70,11 +71,12 @@ The type of user-defined functions and lambdas.
\end{datadesc} \end{datadesc}
\begin{datadesc}{LambdaType} \begin{datadesc}{LambdaType}
An alternative name for \code{FunctionType}. An alternative name for \code{FunctionType}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{CodeType} \begin{datadesc}{CodeType}
The type for code objects such as returned by \code{compile()}. The type for code objects such as returned by
\function{compile()}\bifuncindex{compile}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{ClassType} \begin{datadesc}{ClassType}
...@@ -94,7 +96,8 @@ An alternative name for \code{MethodType}. ...@@ -94,7 +96,8 @@ An alternative name for \code{MethodType}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{BuiltinFunctionType} \begin{datadesc}{BuiltinFunctionType}
The type of built-in functions like \code{len} or \code{sys.exit}. The type of built-in functions like \function{len()} or
\function{sys.exit()}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{BuiltinMethodType} \begin{datadesc}{BuiltinMethodType}
...@@ -110,11 +113,13 @@ The type of open file objects such as \code{sys.stdout}. ...@@ -110,11 +113,13 @@ The type of open file objects such as \code{sys.stdout}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{XRangeType} \begin{datadesc}{XRangeType}
The type of range objects returned by \code{xrange()}. The type of range objects returned by
\function{xrange()}\bifuncindex{xrange}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{TracebackType} \begin{datadesc}{TracebackType}
The type of traceback objects such as found in \code{sys.exc_traceback}. The type of traceback objects such as found in
\code{sys.exc_traceback}.
\end{datadesc} \end{datadesc}
\begin{datadesc}{FrameType} \begin{datadesc}{FrameType}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment