]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
SF bug #1190451: 6.9 First sentence is confusing
authorRaymond Hettinger <python@rcn.com>
Thu, 28 Apr 2005 07:19:39 +0000 (07:19 +0000)
committerRaymond Hettinger <python@rcn.com>
Thu, 28 Apr 2005 07:19:39 +0000 (07:19 +0000)
* 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.

Doc/ref/ref6.tex

index 8eee5b8167db6c0657f790255cd89e6e1e22f6f3..6698f469ada157fa746cf79605078cb247bede18 100644 (file)
@@ -204,12 +204,12 @@ attribute; if it cannot perform the assignment, it raises an exception
 \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 @@ sequence cannot add new items to a list).
 \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 @@ key with the same value existed).
 
 \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 @@ during the code generation phase, causing less detailed error
 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 @@ from __future__ import generators
 \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}