1. python_mirrors
  2. sandbox/doc-theme


Andrew Kuchling  committed 3de8a58

[Bug #1514540] Instead of putting the standard types in a section, put them in a chapter of their own. This means string methods will now show up in the ToC. (Should the types come before or after the functions+exceptions+constants chapter? I've put them after, for now.)

Comments (0)

Files changed (2)

File Doc/lib/lib.tex Modified

View file
  • Ignore whitespace
  • Hide word diff
 % =============
-\input{libobjs}                 % Built-in Types, Exceptions and Functions
+\input{libobjs}                 % Built-in Exceptions and Functions
+\input{libstdtypes}             % Built-in types
 % =============

File Doc/lib/libstdtypes.tex Modified

View file
  • Ignore whitespace
  • Hide word diff
-\section{Built-in Types \label{types}}
+\chapter{Built-in Types \label{types}}
 The following sections describe the standard types that are built into
 the interpreter.
 \citetitle[../tut/tut.html]{Python Tutorial}.)
-\subsection{Truth Value Testing\label{truth}}
+\section{Truth Value Testing\label{truth}}
 Any object can be tested for truth value, for use in an \keyword{if} or
 \keyword{while} condition or as operand of the Boolean operations below.
-\subsection{Boolean Operations ---
+\section{Boolean Operations ---
 	    \keyword{and}, \keyword{or}, \keyword{not}
-\subsection{Comparisons \label{comparisons}}
+\section{Comparisons \label{comparisons}}
 Comparison operations are supported by all objects.  They all have the
 same priority (which is higher than that of the Boolean operations).
 only by sequence types (below).
-\subsection{Numeric Types ---
+\section{Numeric Types ---
 	    \class{int}, \class{float}, \class{long}, \class{complex}
 % XXXJH exceptions: overflow (when? what operations?) zerodivision
-\subsubsection{Bit-string Operations on Integer Types \label{bitstring-ops}}
+\subsection{Bit-string Operations on Integer Types \label{bitstring-ops}}
 \nodename{Bit-string Operations}
 Plain and long integer types support additional operations that make
-\subsection{Iterator Types \label{typeiter}}
+\section{Iterator Types \label{typeiter}}
 \index{iterator protocol}
 supplying the \method{__iter__()} and \method{next()} methods.
-\subsection{Sequence Types ---
+\section{Sequence Types ---
 	    \class{str}, \class{unicode}, \class{list},
 	    \class{tuple}, \class{buffer}, \class{xrange}
-\subsubsection{String Methods \label{string-methods}}
+\subsection{String Methods \label{string-methods}}
 These are the string methods which both 8-bit strings and Unicode
-\subsubsection{String Formatting Operations \label{typesseq-strings}}
+\subsection{String Formatting Operations \label{typesseq-strings}}
 \index{formatting, string (\%{})}
 \index{interpolation, string (\%{})}
-\subsubsection{XRange Type \label{typesseq-xrange}}
+\subsection{XRange Type \label{typesseq-xrange}}
 The \class{xrange}\obindex{xrange} type is an immutable sequence which
 is commonly used for looping.  The advantage of the \class{xrange}
 iteration, and the \function{len()} function.
-\subsubsection{Mutable Sequence Types \label{typesseq-mutable}}
+\subsection{Mutable Sequence Types \label{typesseq-mutable}}
 List objects support additional operations that allow in-place
 modification of the object.
   that the list has been mutated during a sort.
-\subsection{Set Types ---
+\section{Set Types ---
 	    \class{set}, \class{frozenset}
-\subsection{Mapping Types --- \class{dict} \label{typesmapping}}
+\section{Mapping Types --- \class{dict} \label{typesmapping}}
-\subsection{File Objects
+\section{File Objects
 File objects\obindex{file} are implemented using C's \code{stdio}
-\subsection{Context Manager Types \label{typecontextmanager}}
+\section{Context Manager Types \label{typecontextmanager}}
 \index{context manager}
 is negligible.
-\subsection{Other Built-in Types \label{typesother}}
+\section{Other Built-in Types \label{typesother}}
 The interpreter supports several other kinds of objects.
 Most of these support only one or two operations.
-\subsubsection{Modules \label{typesmodules}}
+\subsection{Modules \label{typesmodules}}
 The only special operation on a module is attribute access:
 \code{\var{m}.\var{name}}, where \var{m} is a module and \var{name}
-\subsubsection{Classes and Class Instances \label{typesobjects}}
+\subsection{Classes and Class Instances \label{typesobjects}}
 \nodename{Classes and Instances}
 See chapters 3 and 7 of the \citetitle[../ref/ref.html]{Python
 Reference Manual} for these.
-\subsubsection{Functions \label{typesfunctions}}
+\subsection{Functions \label{typesfunctions}}
 Function objects are created by function definitions.  The only
 operation on a function object is to call it:
 See the \citetitle[../ref/ref.html]{Python Reference Manual} for more
-\subsubsection{Methods \label{typesmethods}}
+\subsection{Methods \label{typesmethods}}
 Methods are functions that are called using the attribute notation.
-\subsubsection{Code Objects \label{bltin-code-objects}}
+\subsection{Code Objects \label{bltin-code-objects}}
 Code objects are used by the implementation to represent
-\subsubsection{Type Objects \label{bltin-type-objects}}
+\subsection{Type Objects \label{bltin-type-objects}}
 Type objects represent the various object types.  An object's type is
 accessed by the built-in function \function{type()}.  There are no special
 Types are written like this: \code{<type 'int'>}.
-\subsubsection{The Null Object \label{bltin-null-object}}
+\subsection{The Null Object \label{bltin-null-object}}
 This object is returned by functions that don't explicitly return a
 value.  It supports no special operations.  There is exactly one null
 It is written as \code{None}.
-\subsubsection{The Ellipsis Object \label{bltin-ellipsis-object}}
+\subsection{The Ellipsis Object \label{bltin-ellipsis-object}}
 This object is used by extended slice notation (see the
 \citetitle[../ref/ref.html]{Python Reference Manual}).  It supports no
 It is written as \code{Ellipsis}.
-\subsubsection{Boolean Values}
+\subsection{Boolean Values}
 Boolean values are the two constant objects \code{False} and
 \code{True}.  They are used to represent truth values (although other
-\subsubsection{Internal Objects \label{typesinternal}}
+\subsection{Internal Objects \label{typesinternal}}
 See the \citetitle[../ref/ref.html]{Python Reference Manual} for this
 information.  It describes stack frame objects, traceback objects, and
 slice objects.
-\subsection{Special Attributes \label{specialattrs}}
+\section{Special Attributes \label{specialattrs}}
 The implementation adds a few special read-only attributes to several
 object types, where they are relevant.  Some of these are not reported