]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add information on support for repietition & concatenation for buffer
authorFred Drake <fdrake@acm.org>
Thu, 2 May 2002 05:59:15 +0000 (05:59 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 2 May 2002 05:59:15 +0000 (05:59 +0000)
and xrange objects, and generally present these in the same way that more
recent documentation releases present them (for ease of maintenance).
This closes SF bug #550555.

Doc/lib/libstdtypes.tex

index 998d6219295d1cd2c90a7ece9aaac3e69ddb2f1b..2e5dfee96695c7717b344ad9463f0c19abb1e2af 100644 (file)
@@ -328,18 +328,26 @@ separating items with commas: \code{[a, b, c]}.  Tuples are
 constructed by the comma operator (not within square brackets), with
 or without enclosing parentheses, but an empty tuple must have the
 enclosing parentheses, e.g., \code{a, b, c} or \code{()}.  A single
-item tuple must have a trailing comma, e.g., \code{(d,)}.  Buffers are
-not directly supported by Python syntax, but can be created by calling the
-builtin function \function{buffer()}.\bifuncindex{buffer}  XRanges
-objects are similar to buffers in that there is no specific syntax to
-create them, but they are created using the \function{xrange()}
-function.\bifuncindex{xrange}
+item tuple must have a trailing comma, e.g., \code{(d,)}.
 \obindex{sequence}
 \obindex{string}
 \obindex{Unicode}
-\obindex{buffer}
 \obindex{tuple}
 \obindex{list}
+
+Buffers are not directly supported by Python syntax, but can be
+created by calling the builtin function
+\function{buffer()}.\bifuncindex{buffer}  They support
+concatenation and repetition, but the result is a new string object
+rather than a new buffer object.
+\obindex{buffer}
+
+Xrange objects are similar to buffers in that there is no specific
+syntax to create them, but they are created using the
+\function{xrange()} function.\bifuncindex{xrange}  They don't support
+slicing or concatenation, but do support repetition, and using
+\code{in}, \code{not in}, \function{min()} or \function{max()} on them
+is inefficient.
 \obindex{xrange}
 
 Sequence types support the following operations.  The \samp{in} and