summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/ref/ref1.tex2
-rw-r--r--Doc/ref/ref2.tex8
-rw-r--r--Doc/ref/ref3.tex5
-rw-r--r--Doc/ref/ref4.tex2
-rw-r--r--Doc/ref/ref5.tex14
5 files changed, 16 insertions, 15 deletions
diff --git a/Doc/ref/ref1.tex b/Doc/ref/ref1.tex
index b611d9c..e821eea 100644
--- a/Doc/ref/ref1.tex
+++ b/Doc/ref/ref1.tex
@@ -71,7 +71,7 @@ In lexical definitions (as the example above), two more conventions
are used: Two literal characters separated by three dots mean a choice
of any single character in the given (inclusive) range of \ASCII{}
characters. A phrase between angular brackets (\code{<...>}) gives an
-informal description of the symbol defined; e.g. this could be used
+informal description of the symbol defined; e.g., this could be used
to describe the notion of `control character' if needed.
\index{lexical definitions}
\index{ASCII@\ASCII{}}
diff --git a/Doc/ref/ref2.tex b/Doc/ref/ref2.tex
index 2eef6ee..3b6adc8 100644
--- a/Doc/ref/ref2.tex
+++ b/Doc/ref/ref2.tex
@@ -38,7 +38,7 @@ A Python program is divided into a number of \emph{logical lines}.
The end of
a logical line is represented by the token NEWLINE. Statements cannot
cross logical line boundaries except where NEWLINE is allowed by the
-syntax (e.g. between statements in compound statements).
+syntax (e.g., between statements in compound statements).
A logical line is constructed from one or more \emph{physical lines}
by following the explicit or implicit \emph{line joining} rules.
\index{logical line}
@@ -455,7 +455,7 @@ definitions:
\begin{verbatim}
floatnumber: pointfloat | exponentfloat
pointfloat: [intpart] fraction | intpart "."
-exponentfloat: (intpart | pointfloat) exponent
+exponentfloat: (nonzerodigit digit* | pointfloat) exponent
intpart: nonzerodigit digit* | "0"
fraction: "." digit+
exponent: ("e"|"E") ["+"|"-"] digit+
@@ -487,10 +487,10 @@ An imaginary literals yields a complex number with a real part of
0.0. Complex numbers are represented as a pair of floating point
numbers and have the same restrictions on their range. To create a
complex number with a nonzero real part, add a floating point number
-to it, e.g. \code{(3+4j)}. Some examples of imaginary literals:
+to it, e.g., \code{(3+4j)}. Some examples of imaginary literals:
\begin{verbatim}
-3.14j 10.j 10 j .001j 1e100j 3.14e-10j
+3.14j 10.j 10j .001j 1e100j 3.14e-10j
\end{verbatim}
diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex
index 4b64e8e..037191e 100644
--- a/Doc/ref/ref3.tex
+++ b/Doc/ref/ref3.tex
@@ -810,7 +810,8 @@ part of the instance, e.g., ``\code{BaseClass.__init__(self, [args...])}''.
\item[{\tt __del__(self)}]
-Called when the instance is about to be destroyed. If a base class
+Called when the instance is about to be destroyed. This is also
+called a destructor\index{destructor}. If a base class
has a \method{__del__()} method, the derived class's \method{__del__()} method
must explicitly call it to ensure proper deletion of the base class
part of the instance. Note that it is possible (though not recommended!)
@@ -1215,7 +1216,7 @@ the other type here).
\strong{Coercion rules}: to evaluate \var{x} \var{op} \var{y}, the
following steps are taken (where \method{__op__()} and
\method{__rop__()} are the method names corresponding to \var{op},
-e.g. if var{op} is `\code{+}', \method{__add__()} and
+e.g., if var{op} is `\code{+}', \method{__add__()} and
\method{__radd__()} are used). If an exception occurs at any point,
the evaluation is abandoned and exception handling takes over.
diff --git a/Doc/ref/ref4.tex b/Doc/ref/ref4.tex
index 4873804..4d5f8d0 100644
--- a/Doc/ref/ref4.tex
+++ b/Doc/ref/ref4.tex
@@ -12,7 +12,7 @@ body. Some code blocks (like modules) are normally executed only once, others
(like function bodies) may be executed many times. Code blocks may
textually contain other code blocks. Code blocks may invoke other
code blocks (that may or may not be textually contained in them) as
-part of their execution, e.g. by invoking (calling) a function.
+part of their execution, e.g., by invoking (calling) a function.
\index{code block}
\indexii{code}{block}
diff --git a/Doc/ref/ref5.tex b/Doc/ref/ref5.tex
index d0d57ec..8624bc6 100644
--- a/Doc/ref/ref5.tex
+++ b/Doc/ref/ref5.tex
@@ -36,7 +36,7 @@ following coercions are applied:
is necessary.
\end{itemize}
-Some additional rules apply for certain operators (e.g. a string left
+Some additional rules apply for certain operators (e.g., a string left
argument to the `\%' operator). Extensions can define their own
coercions.
\section{Atoms}
@@ -216,7 +216,7 @@ involved).
(In particular, converting a string adds quotes around it and converts
``funny'' characters to escape sequences that are safe to print.)
-It is illegal to attempt to convert recursive objects (e.g. lists or
+It is illegal to attempt to convert recursive objects (e.g., lists or
dictionaries that contain a reference to themselves, directly or
indirectly.)
\obindex{recursive}
@@ -248,7 +248,7 @@ attributeref: primary "." identifier
\end{verbatim}
The primary must evaluate to an object of a type that supports
-attribute references, e.g. a module or a list. This object is then
+attribute references, e.g., a module or a list. This object is then
asked to produce the attribute whose name is the identifier. If this
attribute is not available, the exception
\exception{AttributeError}\exindex{AttributeError} is raised.
@@ -361,7 +361,7 @@ respectively, substituting \code{None} for missing expressions.
\subsection{Calls} \label{calls}
\index{call}
-A call calls a callable object (e.g. a function) with a possibly empty
+A call calls a callable object (e.g., a function) with a possibly empty
series of arguments:
\obindex{callable}
@@ -567,7 +567,7 @@ The \code{\%} (modulo) operator yields the remainder from the
division of the first argument by the second. The numeric arguments
are first converted to a common type. A zero right argument raises
the \exception{ZeroDivisionError} exception. The arguments may be floating
-point numbers, e.g. \code{3.14\%0.7} equals \code{0.34} (since
+point numbers, e.g., \code{3.14\%0.7} equals \code{0.34} (since
\code{3.14} equals \code{4*0.7 + 0.34}.) The modulo operator always
yields a result with the same sign as its second operand (or zero);
the absolute value of the result is strictly smaller than the second
@@ -663,7 +663,7 @@ comp_operator: "<"|">"|"=="|">="|"<="|"<>"|"!="|"is" ["not"]|["not"] "in"
Comparisons yield integer values: \code{1} for true, \code{0} for false.
-Comparisons can be chained arbitrarily, e.g. \code{x < y <= z} is
+Comparisons can be chained arbitrarily, e.g., \code{x < y <= z} is
equivalent to \code{x < y and y <= z}, except that \code{y} is
evaluated only once (but in both cases \code{z} is not evaluated at all
when \code{x < y} is found to be false).
@@ -789,7 +789,7 @@ This is sometimes useful, e.g., if \code{s} is a string that should be
replaced by a default value if it is empty, the expression
\code{s or 'foo'} yields the desired value. Because \keyword{not} has to
invent a value anyway, it does not bother to return a value of the
-same type as its argument, so e.g. \code{not 'foo'} yields \code{0},
+same type as its argument, so e.g., \code{not 'foo'} yields \code{0},
not \code{''}.)
Lambda forms (lambda expressions) have the same syntactic position as