]> granicus.if.org Git - python/commitdiff
Sequence indexes are non-negative, not natural (0 is not a natural number).
authorFred Drake <fdrake@acm.org>
Thu, 22 Feb 2001 21:28:04 +0000 (21:28 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 22 Feb 2001 21:28:04 +0000 (21:28 +0000)
Reported by Daniel May <mayds@ecn.purdue.edu>.

De-tabified everywhere.

Doc/ref/ref3.tex

index 31d8fbb92d2e4404df3ba5cf0f0be556bbbff387..bd876cc0583972223eaab87d0e998add206a6727 100644 (file)
@@ -227,7 +227,7 @@ and \code{z.imag}.
 \end{description} % Numbers
 
 \item[Sequences]
-These represent finite ordered sets indexed by natural numbers.
+These represent finite ordered sets indexed by non-negative numbers.
 The built-in function \function{len()}\bifuncindex{len} returns the
 number of items of a sequence.
 When the length of a sequence is \var{n}, the
@@ -1416,55 +1416,55 @@ skipped.
 
 \item[1.] If \var{x} is a class instance:
 
-       \begin{itemize}
+        \begin{itemize}
 
-       \item[1a.] If \var{x} has a \method{__coerce__()} method:
-       replace \var{x} and \var{y} with the 2-tuple returned by
-       \code{\var{x}.__coerce__(\var{y})}; skip to step 2 if the
-       coercion returns \code{None}.
+        \item[1a.] If \var{x} has a \method{__coerce__()} method:
+        replace \var{x} and \var{y} with the 2-tuple returned by
+        \code{\var{x}.__coerce__(\var{y})}; skip to step 2 if the
+        coercion returns \code{None}.
 
-       \item[1b.] If neither \var{x} nor \var{y} is a class instance
-       after coercion, go to step 3.
+        \item[1b.] If neither \var{x} nor \var{y} is a class instance
+        after coercion, go to step 3.
 
-       \item[1c.] If \var{x} has a method \method{__op__()}, return
-       \code{\var{x}.__op__(\var{y})}; otherwise, restore \var{x} and
-       \var{y} to their value before step 1a.
+        \item[1c.] If \var{x} has a method \method{__op__()}, return
+        \code{\var{x}.__op__(\var{y})}; otherwise, restore \var{x} and
+        \var{y} to their value before step 1a.
 
-       \end{itemize}
+        \end{itemize}
 
 \item[2.] If \var{y} is a class instance:
 
-       \begin{itemize}
+        \begin{itemize}
 
-       \item[2a.] If \var{y} has a \method{__coerce__()} method:
-       replace \var{y} and \var{x} with the 2-tuple returned by
-       \code{\var{y}.__coerce__(\var{x})}; skip to step 3 if the
-       coercion returns \code{None}.
+        \item[2a.] If \var{y} has a \method{__coerce__()} method:
+        replace \var{y} and \var{x} with the 2-tuple returned by
+        \code{\var{y}.__coerce__(\var{x})}; skip to step 3 if the
+        coercion returns \code{None}.
 
-       \item[2b.] If neither \var{x} nor \var{y} is a class instance
-       after coercion, go to step 3.
+        \item[2b.] If neither \var{x} nor \var{y} is a class instance
+        after coercion, go to step 3.
 
-       \item[2b.] If \var{y} has a method \method{__rop__()}, return
-       \code{\var{y}.__rop__(\var{x})}; otherwise, restore \var{x}
-       and \var{y} to their value before step 2a.
+        \item[2b.] If \var{y} has a method \method{__rop__()}, return
+        \code{\var{y}.__rop__(\var{x})}; otherwise, restore \var{x}
+        and \var{y} to their value before step 2a.
 
-       \end{itemize}
+        \end{itemize}
 
 \item[3.] We only get here if neither \var{x} nor \var{y} is a class
 instance.
 
-       \begin{itemize}
+        \begin{itemize}
 
-       \item[3a.] If op is `\code{+}' and \var{x} is a sequence,
-       sequence concatenation is invoked.
+        \item[3a.] If op is `\code{+}' and \var{x} is a sequence,
+        sequence concatenation is invoked.
 
-       \item[3b.] If op is `\code{*}' and one operand is a sequence
-       and the other an integer, sequence repetition is invoked.
+        \item[3b.] If op is `\code{*}' and one operand is a sequence
+        and the other an integer, sequence repetition is invoked.
 
-       \item[3c.] Otherwise, both operands must be numbers; they are
-       coerced to a common type if possible, and the numeric
-       operation is invoked for that type.
+        \item[3c.] Otherwise, both operands must be numbers; they are
+        coerced to a common type if possible, and the numeric
+        operation is invoked for that type.
 
-       \end{itemize}
+        \end{itemize}
 
 \end{itemize}