summaryrefslogtreecommitdiffstats
path: root/Doc/ref
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/ref')
-rw-r--r--Doc/ref/ref3.tex12
-rw-r--r--Doc/ref/ref4.tex6
-rw-r--r--Doc/ref/ref5.tex10
-rw-r--r--Doc/ref/ref6.tex4
-rw-r--r--Doc/ref/ref7.tex2
5 files changed, 24 insertions, 10 deletions
diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex
index 8d327e0..67848bb8 100644
--- a/Doc/ref/ref3.tex
+++ b/Doc/ref/ref3.tex
@@ -470,7 +470,7 @@ A file object represents an open file. (It is a wrapper around a C
\verb@open()@ built-in function, and also by \verb@posix.popen()@ and
the \verb@makefile@ method of socket objects. \verb@sys.stdin@,
\verb@sys.stdout@ and \verb@sys.stderr@ are file objects corresponding
-the the interpreter's standard input, output and error streams.
+to the interpreter's standard input, output and error streams.
See the Python Library Reference for methods of file objects and other
details.
\obindex{file}
@@ -498,7 +498,7 @@ but they are mentioned here for completeness.
Code objects represent executable code. The difference between a code
object and a function object is that the function object contains an
explicit reference to the function's context (the module in which it
-was defined) which a code object contains no context. There is no way
+was defined) while a code object contains no context. There is no way
to execute a bare code object.
\obindex{code}
@@ -622,8 +622,12 @@ former decrements the reference count for \code{x} by one, but
\code{x,__del__} is only called when its reference count reaches zero.
\item[\tt __repr__(self)]
-Called by the \verb@repr()@ built-in function and by conversions
-(reverse quotes) to compute the string representation of an object.
+Called by the \verb@repr()@ built-in function and by string conversions
+(reverse or backward quotes) to compute the string representation of an object.
+\indexii{string}{conversion}
+\indexii{reverse}{quotes}
+\indexii{backward}{quotes}
+\index{back-quotes}
\item[\tt __str__(self)]
Called by the \verb@str()@ built-in function and by the \verb@print@
diff --git a/Doc/ref/ref4.tex b/Doc/ref/ref4.tex
index c4c4abc..0198117 100644
--- a/Doc/ref/ref4.tex
+++ b/Doc/ref/ref4.tex
@@ -72,9 +72,9 @@ When a global name is not found in the global name space, it is
searched in the list of ``built-in'' names (which is actually the
global name space of the module \verb@__builtin__@). When a name is not
found at all, the \verb@NameError@ exception is raised.%
-\footnote{If the code block contains \verb@exec@ statements or the
-construct \verb@from ... import *@, the semantics of names not
-explicitly mentioned in a \verb@global@ statement change subtly: name
+\footnote{If the code block contains {\tt exec} statements or the
+construct {\tt from \ldots import *}, the semantics of names not
+explicitly mentioned in a {\tt global} statement change subtly: name
lookup first searches the local name space, then the global one, then
the built-in one.}
diff --git a/Doc/ref/ref5.tex b/Doc/ref/ref5.tex
index a4a7b53..af385aa 100644
--- a/Doc/ref/ref5.tex
+++ b/Doc/ref/ref5.tex
@@ -187,6 +187,9 @@ value prevails.
\subsection{String conversions}
\indexii{string}{conversion}
+\indexii{reverse}{quotes}
+\indexii{backward}{quotes}
+\index{back-quotes}
A string conversion is a condition list enclosed in reverse (or
backward) quotes:
@@ -214,6 +217,13 @@ dictionaries that contain a reference to themselves, directly or
indirectly.)
\obindex{recursive}
+The built-in function \verb@repr()@ performs exactly the same
+conversion in its argument as enclosing it it reverse quotes does.
+The built-in function \verb@str()@ performs a similar but more
+user-friendly conversion.
+\bifuncindex{repr}
+\bifuncindex{str}
+
\section{Primaries} \label{primaries}
\index{primary}
diff --git a/Doc/ref/ref6.tex b/Doc/ref/ref6.tex
index 53e6c40..70e1a68 100644
--- a/Doc/ref/ref6.tex
+++ b/Doc/ref/ref6.tex
@@ -166,7 +166,7 @@ sequence cannot add new items to a list).
If the primary is a mapping (dictionary) object, the subscript must
have a type compatible with the mapping's key type, and the mapping is
-then asked to to create a key/datum pair which maps the subscript to
+then asked to create a key/datum pair which maps the subscript to
the assigned object. This can either replace an existing key/value
pair with the same key value, or insert a new key/value pair (if no
key with the same value existed).
@@ -369,7 +369,7 @@ continue_stmt: "continue"
\verb@continue@ may only occur syntactically nested in a \verb@for@ or
\verb@while@ loop, but not nested in a function or class definition or
\verb@try@ statement within that loop.\footnote{Except that it may
-currently occur within an \verb@except@ clause.}
+currently occur within an {\tt except} clause.}
\stindex{for}
\stindex{while}
\indexii{loop}{statement}
diff --git a/Doc/ref/ref7.tex b/Doc/ref/ref7.tex
index b8babfb9..f099ae5 100644
--- a/Doc/ref/ref7.tex
+++ b/Doc/ref/ref7.tex
@@ -299,7 +299,7 @@ default value is substituted. If a parameter has a default value, all
following parameters must also have a default value --- this is a
syntactic restriction that is not expressed by the grammar.%
\footnote{Currently this is not checked; instead,
-\verb@def f(a=1,b)@ is interpreted as \verb@def f(a=1,b=None)@.}
+{\tt def f(a=1,b)} is interpreted as {\tt def f(a=1,b=None)}.}
\indexiii{default}{parameter}{value}
Function call semantics are described in section \ref{calls}. When a