Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5fe2c13

Browse files
committed
List constraints on xrange() objects.
1 parent c09cf33 commit 5fe2c13

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

Doc/lib/libstdtypes.tex

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -379,21 +379,27 @@ \subsection{Sequence Types \label{typesseq}}
379379
constructed by the comma operator (not within square brackets), with
380380
or without enclosing parentheses, but an empty tuple must have the
381381
enclosing parentheses, e.g., \code{a, b, c} or \code{()}. A single
382-
item tuple must have a trailing comma, e.g., \code{(d,)}. Buffers are
383-
not directly supported by Python syntax, but can be created by calling the
384-
builtin function \function{buffer()}.\bifuncindex{buffer} XRanges
385-
objects are similar to buffers in that there is no specific syntax to
386-
create them, but they are created using the \function{xrange()}
387-
function.\bifuncindex{xrange}
382+
item tuple must have a trailing comma, e.g., \code{(d,)}.
388383
\obindex{sequence}
389384
\obindex{string}
390385
\obindex{Unicode}
391-
\obindex{buffer}
392386
\obindex{tuple}
393387
\obindex{list}
388+
389+
Buffer objects are not directly supported by Python syntax, but can be
390+
created by calling the builtin function
391+
\function{buffer()}.\bifuncindex{buffer}. They don't support
392+
concatenation or repetition.
393+
\obindex{buffer}
394+
395+
Xrange objects are similar to buffers in that there is no specific
396+
syntax to create them, but they are created using the \function{xrange()}
397+
function.\bifuncindex{xrange} They don't support slicing,
398+
concatenation or repetition, and using \code{in}, \code{not in},
399+
\function{min()} or \function{max()} on them is inefficient.
394400
\obindex{xrange}
395401

396-
Sequence types support the following operations. The \samp{in} and
402+
Most sequence types support the following operations. The \samp{in} and
397403
\samp{not in} operations have the same priorities as the comparison
398404
operations. The \samp{+} and \samp{*} operations have the same
399405
priority as the corresponding numeric operations.\footnote{They must

0 commit comments

Comments
 (0)