summaryrefslogtreecommitdiffstats
path: root/Doc/ref
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/ref')
-rw-r--r--Doc/ref/ref1.tex1
-rw-r--r--Doc/ref/ref3.tex2
-rw-r--r--Doc/ref/ref4.tex1
-rw-r--r--Doc/ref/ref5.tex17
-rw-r--r--Doc/ref/ref6.tex12
-rw-r--r--Doc/ref/ref7.tex6
-rw-r--r--Doc/ref/ref8.tex4
7 files changed, 43 insertions, 0 deletions
diff --git a/Doc/ref/ref1.tex b/Doc/ref/ref1.tex
index 37fbad7..d6bb8b2 100644
--- a/Doc/ref/ref1.tex
+++ b/Doc/ref/ref1.tex
@@ -33,6 +33,7 @@ standard modules. These are not documented here, but in the separate
built-in modules are mentioned when they interact in a significant way
with the language definition.
+
\section{Notation\label{notation}}
The descriptions of lexical analysis and syntax use a modified BNF
diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex
index a82ce8c..06155c0 100644
--- a/Doc/ref/ref3.tex
+++ b/Doc/ref/ref3.tex
@@ -1,5 +1,6 @@
\chapter{Data model\label{datamodel}}
+
\section{Objects, values and types\label{objects}}
\dfn{Objects} are Python's abstraction for data. All data in a Python
@@ -95,6 +96,7 @@ lists.
(Note that \samp{c = d = []} assigns the same object to both
\code{c} and \code{d}.)
+
\section{The standard type hierarchy\label{types}}
Below is a list of the types that are built into Python. Extension
diff --git a/Doc/ref/ref4.tex b/Doc/ref/ref4.tex
index 754a5b5..2272f3e 100644
--- a/Doc/ref/ref4.tex
+++ b/Doc/ref/ref4.tex
@@ -1,6 +1,7 @@
\chapter{Execution model \label{execmodel}}
\index{execution model}
+
\section{Code blocks, execution frames, and namespaces \label{execframes}}
\index{code block}
\index{namespace}
diff --git a/Doc/ref/ref5.tex b/Doc/ref/ref5.tex
index d66996a..37d1f2d 100644
--- a/Doc/ref/ref5.tex
+++ b/Doc/ref/ref5.tex
@@ -16,6 +16,7 @@ and no semantics are given, the semantics of this form of \code{name}
are the same as for \code{othername}.
\index{syntax}
+
\section{Arithmetic conversions\label{conversions}}
\indexii{arithmetic}{conversion}
@@ -54,6 +55,7 @@ atom: identifier | literal | enclosure
enclosure: parenth_form|list_display|dict_display|string_conversion
\end{verbatim}
+
\subsection{Identifiers (Names)\label{atom-identifiers}}
\index{name}
\index{identifier}
@@ -99,6 +101,7 @@ transformed name is extremely long (longer than 255 characters),
implementation defined truncation may happen. If the class name
consists only of underscores, no transformation is done.
+
\subsection{Literals\label{atom-literals}}
\index{literal}
@@ -122,6 +125,7 @@ the same object or a different object with the same value.
\indexiii{immutable}{data}{type}
\indexii{immutable}{object}
+
\subsection{Parenthesized forms\label{parenthesized}}
\index{parenthesized form}
@@ -150,6 +154,7 @@ pass uncaught.
\index{comma}
\indexii{tuple}{display}
+
\subsection{List displays\label{lists}}
\indexii{list}{display}
\indexii{list}{comprehensions}
@@ -181,6 +186,7 @@ each time the innermost block is reached.
\obindex{list}
\indexii{empty}{list}
+
\subsection{Dictionary displays\label{dict}}
\indexii{dictionary}{display}
@@ -210,6 +216,7 @@ are not detected; the last datum (textually rightmost in the display)
stored for a given key value prevails.
\indexii{immutable}{object}
+
\subsection{String conversions\label{string-conversions}}
\indexii{string}{conversion}
\indexii{reverse}{quotes}
@@ -249,6 +256,7 @@ similar but more user-friendly conversion.
\bifuncindex{repr}
\bifuncindex{str}
+
\section{Primaries\label{primaries}}
\index{primary}
@@ -259,6 +267,7 @@ Their syntax is:
primary: atom | attributeref | subscription | slicing | call
\end{verbatim}
+
\subsection{Attribute references\label{attribute-references}}
\indexii{attribute}{reference}
@@ -279,6 +288,7 @@ yield different objects.
\obindex{module}
\obindex{list}
+
\subsection{Subscriptions\label{subscriptions}}
\index{subscription}
@@ -316,6 +326,7 @@ type but a string of exactly one character.
\index{character}
\indexii{string}{item}
+
\subsection{Slicings\label{slicings}}
\index{slicing}
\index{slice}
@@ -382,6 +393,7 @@ expressions.
\withsubitem{(slice object attribute)}{\ttindex{start}
\ttindex{stop}\ttindex{step}}
+
\subsection{Calls\label{calls}}
\index{call}
@@ -556,6 +568,7 @@ In all three cases, if the argument does not have the proper type,
a \exception{TypeError} exception is raised.
\exindex{TypeError}
+
\section{Binary arithmetic operations\label{binary}}
\indexiii{binary}{arithmetic}{operation}
@@ -626,6 +639,7 @@ arguments. The numeric arguments are first converted to a common
type.
\index{subtraction}
+
\section{Shifting operations\label{shifting}}
\indexii{shifting}{operation}
@@ -650,6 +664,7 @@ value. Negative shift counts raise a \exception{ValueError}
exception.
\exindex{ValueError}
+
\section{Binary bit-wise operations\label{bitwise}}
\indexiii{binary}{bit-wise}{operation}
@@ -678,6 +693,7 @@ converted to a common type.
\indexii{bit-wise}{or}
\indexii{inclusive}{or}
+
\section{Comparisons\label{comparisons}}
\index{comparison}
@@ -808,6 +824,7 @@ truth value.
\opindex{is not}
\indexii{identity}{test}
+
\section{Boolean operations\label{Booleans}}
\indexii{Boolean}{operation}
diff --git a/Doc/ref/ref6.tex b/Doc/ref/ref6.tex
index f90317f..4cf30ff 100644
--- a/Doc/ref/ref6.tex
+++ b/Doc/ref/ref6.tex
@@ -22,6 +22,7 @@ simple_stmt: expression_stmt
| exec_stmt
\end{verbatim}
+
\section{Expression statements \label{exprstmts}}
\indexii{expression}{statement}
@@ -52,6 +53,7 @@ any output.)
\indexii{writing}{values}
\indexii{procedure}{call}
+
\section{Assert statements \label{assert}}
Assert statements\stindex{assert} are a convenient way to insert
@@ -89,6 +91,7 @@ it will be displayed as part of the stack trace.
Assignments to \code{__debug__} are illegal. The value for the
built-in variable is determined when the interpreter starts.
+
\section{Assignment statements \label{assignment}}
Assignment statements\indexii{assignment}{statement} are used to
@@ -306,6 +309,7 @@ def f(arg): pass # a function that does nothing (yet)
class C: pass # a class with no methods (yet)
\end{verbatim}
+
\section{The \keyword{del} statement \label{del}}
\stindex{del}
@@ -334,6 +338,7 @@ is in general equivalent to assignment of an empty slice of the
right type (but even this is determined by the sliced object).
\indexii{attribute}{deletion}
+
\section{The \keyword{print} statement \label{print}}
\stindex{print}
@@ -385,6 +390,7 @@ the subsequent expressions are printed to this file object. If the
first expression evaluates to \code{None}, then \code{sys.stdout} is
used as the file for output.
+
\section{The \keyword{return} statement \label{return}}
\stindex{return}
@@ -408,6 +414,7 @@ with a \keyword{finally} clause, that \keyword{finally} clause is executed
before really leaving the function.
\kwindex{finally}
+
\section{The \keyword{raise} statement \label{raise}}
\stindex{raise}
@@ -448,6 +455,7 @@ exception occurred. This is useful to re-raise an exception
transparently in an except clause.
\obindex{traceback}
+
\section{The \keyword{break} statement \label{break}}
\stindex{break}
@@ -475,6 +483,7 @@ with a \keyword{finally} clause, that \keyword{finally} clause is executed
before really leaving the loop.
\kwindex{finally}
+
\section{The \keyword{continue} statement \label{continue}}
\stindex{continue}
@@ -494,6 +503,7 @@ It continues with the next cycle of the nearest enclosing loop.
\indexii{loop}{statement}
\kwindex{finally}
+
\section{The \keyword{import} statement \label{import}}
\stindex{import}
@@ -594,6 +604,7 @@ about how the module search works from inside a package.]
[XXX Also should mention __import__().]
\bifuncindex{__import__}
+
\section{The \keyword{global} statement \label{global}}
\stindex{global}
@@ -634,6 +645,7 @@ containing the \keyword{exec} statement. The same applies to the
\bifuncindex{execfile}
\bifuncindex{compile}
+
\section{The \keyword{exec} statement \label{exec}}
\stindex{exec}
diff --git a/Doc/ref/ref7.tex b/Doc/ref/ref7.tex
index c88d983..64d3621 100644
--- a/Doc/ref/ref7.tex
+++ b/Doc/ref/ref7.tex
@@ -60,6 +60,7 @@ statement, thus there are no ambiguities (the `dangling
The formatting of the grammar rules in the following sections places
each clause on a separate line for clarity.
+
\section{The \keyword{if} statement\label{if}}
\stindex{if}
@@ -80,6 +81,7 @@ present, is executed.
\kwindex{elif}
\kwindex{else}
+
\section{The \keyword{while} statement\label{while}}
\stindex{while}
\indexii{loop}{statement}
@@ -105,6 +107,7 @@ of the suite and goes back to testing the expression.
\stindex{break}
\stindex{continue}
+
\section{The \keyword{for} statement\label{for}}
\stindex{for}
\indexii{loop}{statement}
@@ -169,6 +172,7 @@ for x in a[:]:
if x < 0: a.remove(x)
\end{verbatim}
+
\section{The \keyword{try} statement\label{try}}
\stindex{try}
@@ -278,6 +282,7 @@ restriction may be lifted in the future).
\stindex{break}
\stindex{continue}
+
\section{Function definitions\label{function}}
\indexii{function}{definition}
@@ -368,6 +373,7 @@ passed around. The semantics of name resolution in the nested
function will change in Python 2.2. See the appendix for a
description of the new semantics.
+
\section{Class definitions\label{class}}
\indexii{class}{definition}
diff --git a/Doc/ref/ref8.tex b/Doc/ref/ref8.tex
index cadbc5d..24d10b1 100644
--- a/Doc/ref/ref8.tex
+++ b/Doc/ref/ref8.tex
@@ -6,6 +6,7 @@ typed in interactively, from a module source file, etc. This chapter
gives the syntax used in these cases.
\index{interpreter}
+
\section{Complete Python programs\label{programs}}
\index{program}
@@ -43,6 +44,7 @@ program.
\index{command line}
\index{standard input}
+
\section{File input\label{file-input}}
All input read from non-interactive files has the same form:
@@ -63,6 +65,7 @@ This syntax is used in the following situations:
\end{itemize}
+
\section{Interactive input\label{interactive}}
Input in interactive mode is parsed using the following grammar:
@@ -75,6 +78,7 @@ Note that a (top-level) compound statement must be followed by a blank
line in interactive mode; this is needed to help the parser detect the
end of the input.
+
\section{Expression input\label{expression-input}}
\index{input}