e.g. -> e.g.,

This commit is contained in:
Guido van Rossum 1998-07-24 15:36:43 +00:00
parent c2aa9fbad9
commit 7c0240f112
5 changed files with 16 additions and 15 deletions

View File

@ -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 are used: Two literal characters separated by three dots mean a choice
of any single character in the given (inclusive) range of \ASCII{} of any single character in the given (inclusive) range of \ASCII{}
characters. A phrase between angular brackets (\code{<...>}) gives an 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. to describe the notion of `control character' if needed.
\index{lexical definitions} \index{lexical definitions}
\index{ASCII@\ASCII{}} \index{ASCII@\ASCII{}}

View File

@ -38,7 +38,7 @@ A Python program is divided into a number of \emph{logical lines}.
The end of The end of
a logical line is represented by the token NEWLINE. Statements cannot a logical line is represented by the token NEWLINE. Statements cannot
cross logical line boundaries except where NEWLINE is allowed by the 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} A logical line is constructed from one or more \emph{physical lines}
by following the explicit or implicit \emph{line joining} rules. by following the explicit or implicit \emph{line joining} rules.
\index{logical line} \index{logical line}
@ -455,7 +455,7 @@ definitions:
\begin{verbatim} \begin{verbatim}
floatnumber: pointfloat | exponentfloat floatnumber: pointfloat | exponentfloat
pointfloat: [intpart] fraction | intpart "." pointfloat: [intpart] fraction | intpart "."
exponentfloat: (intpart | pointfloat) exponent exponentfloat: (nonzerodigit digit* | pointfloat) exponent
intpart: nonzerodigit digit* | "0" intpart: nonzerodigit digit* | "0"
fraction: "." digit+ fraction: "." digit+
exponent: ("e"|"E") ["+"|"-"] 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 0.0. Complex numbers are represented as a pair of floating point
numbers and have the same restrictions on their range. To create a numbers and have the same restrictions on their range. To create a
complex number with a nonzero real part, add a floating point number 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} \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} \end{verbatim}

View File

@ -810,7 +810,8 @@ part of the instance, e.g., ``\code{BaseClass.__init__(self, [args...])}''.
\item[{\tt __del__(self)}] \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 has a \method{__del__()} method, the derived class's \method{__del__()} method
must explicitly call it to ensure proper deletion of the base class must explicitly call it to ensure proper deletion of the base class
part of the instance. Note that it is possible (though not recommended!) 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 \strong{Coercion rules}: to evaluate \var{x} \var{op} \var{y}, the
following steps are taken (where \method{__op__()} and following steps are taken (where \method{__op__()} and
\method{__rop__()} are the method names corresponding to \var{op}, \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, \method{__radd__()} are used). If an exception occurs at any point,
the evaluation is abandoned and exception handling takes over. the evaluation is abandoned and exception handling takes over.

View File

@ -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 (like function bodies) may be executed many times. Code blocks may
textually contain other code blocks. Code blocks may invoke other textually contain other code blocks. Code blocks may invoke other
code blocks (that may or may not be textually contained in them) as 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} \index{code block}
\indexii{code}{block} \indexii{code}{block}

View File

@ -36,7 +36,7 @@ following coercions are applied:
is necessary. is necessary.
\end{itemize} \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 argument to the `\%' operator). Extensions can define their own
coercions. coercions.
\section{Atoms} \section{Atoms}
@ -216,7 +216,7 @@ involved).
(In particular, converting a string adds quotes around it and converts (In particular, converting a string adds quotes around it and converts
``funny'' characters to escape sequences that are safe to print.) ``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 dictionaries that contain a reference to themselves, directly or
indirectly.) indirectly.)
\obindex{recursive} \obindex{recursive}
@ -248,7 +248,7 @@ attributeref: primary "." identifier
\end{verbatim} \end{verbatim}
The primary must evaluate to an object of a type that supports 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 asked to produce the attribute whose name is the identifier. If this
attribute is not available, the exception attribute is not available, the exception
\exception{AttributeError}\exindex{AttributeError} is raised. \exception{AttributeError}\exindex{AttributeError} is raised.
@ -361,7 +361,7 @@ respectively, substituting \code{None} for missing expressions.
\subsection{Calls} \label{calls} \subsection{Calls} \label{calls}
\index{call} \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: series of arguments:
\obindex{callable} \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 division of the first argument by the second. The numeric arguments
are first converted to a common type. A zero right argument raises are first converted to a common type. A zero right argument raises
the \exception{ZeroDivisionError} exception. The arguments may be floating 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 \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); 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 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 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 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 evaluated only once (but in both cases \code{z} is not evaluated at all
when \code{x < y} is found to be false). 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 replaced by a default value if it is empty, the expression
\code{s or 'foo'} yields the desired value. Because \keyword{not} has to \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 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{''}.) not \code{''}.)
Lambda forms (lambda expressions) have the same syntactic position as Lambda forms (lambda expressions) have the same syntactic position as