# [Python-checkins] python/dist/src/Doc/ref ref6.tex,1.75,1.76

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Thu Apr 28 09:18:50 CEST 2005

Update of /cvsroot/python/python/dist/src/Doc/ref
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23428

Modified Files:
ref6.tex
Log Message:
SF bug #1190451:  6.9 First sentence is confusing

* Fixed incorrect wording:  expression->exception
* Noted the specific exception reported by "raise" when the is nothing
to re-raise.
* Eliminated several instances of "e.g." as recommended in the style guide.

Index: ref6.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref6.tex,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- ref6.tex	1 Jan 2005 00:28:44 -0000	1.75
+++ ref6.tex	28 Apr 2005 07:18:47 -0000	1.76
@@ -204,12 +204,12 @@
\item
If the target is a subscription: The primary expression in the
reference is evaluated.  It should yield either a mutable sequence
-object (e.g., a list) or a mapping object (e.g., a dictionary).  Next,
+object (such as a list) or a mapping object (such as a dictionary). Next,
the subscript expression is evaluated.
\indexii{subscription}{assignment}
\obindex{mutable}

-If the primary is a mutable sequence object (e.g., a list), the subscript
+If the primary is a mutable sequence object (such as a list), the subscript
must yield a plain integer.  If it is negative, the sequence's length
is added to it.  The resulting value must be a nonnegative integer
less than the sequence's length, and the sequence is asked to assign
@@ -219,7 +219,7 @@
\obindex{sequence}
\obindex{list}

-If the primary is a mapping object (e.g., a dictionary), the subscript must
+If the primary is a mapping object (such as a dictionary), the subscript must
have a type compatible with the mapping's key type, and the mapping is
then asked to create a key/datum pair which maps the subscript to
the assigned object.  This can either replace an existing key/value
@@ -230,7 +230,7 @@

\item
If the target is a slicing: The primary expression in the reference is
-evaluated.  It should yield a mutable sequence object (e.g., a list).  The
+evaluated.  It should yield a mutable sequence object (such as a list).  The
assigned object should be a sequence object of the same type.  Next,
the lower and upper bound expressions are evaluated, insofar they are
present; defaults are zero and the sequence's length.  The bounds
@@ -251,7 +251,7 @@
messages.)

WARNING: Although the definition of assignment implies that overlaps
-between the left-hand side and the right-hand side are safe' (e.g.,
+between the left-hand side and the right-hand side are safe' (for example
\samp{a, b = b, a} swaps two variables), overlaps \emph{within} the
collection of assigned-to variables are not safe!  For instance, the
following program prints \samp{[0, 2]}:
@@ -523,8 +523,9 @@
\end{productionlist}

If no expressions are present, \keyword{raise} re-raises the last
-expression that was active in the current scope.  If no exception is
-active in the current scope, an exception is raised indicating this error.
+exception that was active in the current scope.  If no exception is
+active in the current scope, a \exception{Queue.Empty} exception is
+raised indicating this error.
\index{exception}
\indexii{raising}{exception}