diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2006-07-31 16:10:24 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2006-07-31 16:10:24 (GMT) |
commit | aa95fdb783c37d6053fc494d2018dc08889f4ed1 (patch) | |
tree | 3a139eed5d7e33829adaa3563911d4787786dfe5 /Doc | |
parent | fbf969928f9cde380888d3b5f2a2d0f52a0e7b09 (diff) | |
download | cpython-aa95fdb783c37d6053fc494d2018dc08889f4ed1.zip cpython-aa95fdb783c37d6053fc494d2018dc08889f4ed1.tar.gz cpython-aa95fdb783c37d6053fc494d2018dc08889f4ed1.tar.bz2 |
[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.)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/lib.tex | 4 | ||||
-rw-r--r-- | Doc/lib/libstdtypes.tex | 56 |
2 files changed, 30 insertions, 30 deletions
diff --git a/Doc/lib/lib.tex b/Doc/lib/lib.tex index c57e4a5..837c759 100644 --- a/Doc/lib/lib.tex +++ b/Doc/lib/lib.tex @@ -71,12 +71,12 @@ and how to embed it in other applications. % BUILT-INs % ============= -\input{libobjs} % Built-in Types, Exceptions and Functions +\input{libobjs} % Built-in Exceptions and Functions \input{libfuncs} -\input{libstdtypes} \input{libexcs} \input{libconsts} +\input{libstdtypes} % Built-in types % ============= diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex index 3fe217b..f91b06c 100644 --- a/Doc/lib/libstdtypes.tex +++ b/Doc/lib/libstdtypes.tex @@ -1,4 +1,4 @@ -\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. @@ -24,7 +24,7 @@ and other language statements can be found in the \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. @@ -71,7 +71,7 @@ return one of their operands.) \index{False} \index{True} -\subsection{Boolean Operations --- +\section{Boolean Operations --- \keyword{and}, \keyword{or}, \keyword{not} \label{boolean}} @@ -107,7 +107,7 @@ These only evaluate their second argument if needed for their outcome. \end{description} -\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). @@ -174,7 +174,7 @@ Two more operations with the same syntactic priority, only by sequence types (below). -\subsection{Numeric Types --- +\section{Numeric Types --- \class{int}, \class{float}, \class{long}, \class{complex} \label{typesnumeric}} @@ -307,7 +307,7 @@ though the result's type is not necessarily int. \end{description} % 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 @@ -350,7 +350,7 @@ division by \code{pow(2, \var{n})} without overflow check. \end{description} -\subsection{Iterator Types \label{typeiter}} +\section{Iterator Types \label{typeiter}} \versionadded{2.2} \index{iterator protocol} @@ -414,7 +414,7 @@ return an iterator object (technically, a generator object) 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} \label{typesseq}} @@ -566,7 +566,7 @@ linear concatenation performance across versions and implementations. \end{description} -\subsubsection{String Methods \label{string-methods}} +\subsection{String Methods \label{string-methods}} \indexii{string}{methods} These are the string methods which both 8-bit strings and Unicode @@ -901,7 +901,7 @@ of length \var{width}. The original string is returned if \end{methoddesc} -\subsubsection{String Formatting Operations \label{typesseq-strings}} +\subsection{String Formatting Operations \label{typesseq-strings}} \index{formatting, string (\%{})} \index{interpolation, string (\%{})} @@ -1072,7 +1072,7 @@ Additional string operations are defined in standard modules \refmodule{re}.\refstmodindex{re} -\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} @@ -1084,7 +1084,7 @@ XRange objects have very little behavior: they only support indexing, 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. @@ -1216,7 +1216,7 @@ Notes: that the list has been mutated during a sort. \end{description} -\subsection{Set Types --- +\section{Set Types --- \class{set}, \class{frozenset} \label{types-set}} \obindex{set} @@ -1355,7 +1355,7 @@ The design of the set types was based on lessons learned from the \end{seealso} -\subsection{Mapping Types --- \class{dict} \label{typesmapping}} +\section{Mapping Types --- \class{dict} \label{typesmapping}} \obindex{mapping} \obindex{dictionary} @@ -1518,7 +1518,7 @@ For an example, see \module{collections}.\class{defaultdict}. \end{description} -\subsection{File Objects +\section{File Objects \label{bltin-file-objects}} File objects\obindex{file} are implemented using C's \code{stdio} @@ -1797,7 +1797,7 @@ implemented in C will have to provide a writable \end{memberdesc} -\subsection{Context Manager Types \label{typecontextmanager}} +\section{Context Manager Types \label{typecontextmanager}} \versionadded{2.5} \index{context manager} @@ -1878,13 +1878,13 @@ runtime context, the overhead of a single class dictionary lookup 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} @@ -1910,14 +1910,14 @@ written as \code{<module 'os' from '/usr/local/lib/python\shortversion/os.pyc'>}. -\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: @@ -1931,7 +1931,7 @@ different object types. See the \citetitle[../ref/ref.html]{Python Reference Manual} for more information. -\subsubsection{Methods \label{typesmethods}} +\subsection{Methods \label{typesmethods}} \obindex{method} Methods are functions that are called using the attribute notation. @@ -1976,7 +1976,7 @@ See the \citetitle[../ref/ref.html]{Python Reference Manual} for more information. -\subsubsection{Code Objects \label{bltin-code-objects}} +\subsection{Code Objects \label{bltin-code-objects}} \obindex{code} Code objects are used by the implementation to represent @@ -1999,7 +1999,7 @@ See the \citetitle[../ref/ref.html]{Python Reference Manual} for more information. -\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 @@ -2011,7 +2011,7 @@ for all standard built-in types. 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 @@ -2020,7 +2020,7 @@ object, named \code{None} (a built-in name). 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 @@ -2029,7 +2029,7 @@ special operations. There is exactly one ellipsis object, named 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 @@ -2046,14 +2046,14 @@ They are written as \code{False} and \code{True}, respectively. \indexii{Boolean}{values} -\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 |