Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libstdtypes.tex @ 14044:a905c5aa0691 legacy-trunk
As pointed out by Denis S. Otkidach <den@analyt.chem.msu.ru>, xrange()
returns an xrange object, not a range object, despite the name of the
source file they're implemented in.
In the list of comparison operators, list != before <>, since <> is
described as obsolescent.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Fri, 18 Aug 2000 03:12:38 +0000 |
| parents | 7b7ee58901fb |
| children | ac0246586d52 |
line wrap: on
line diff
--- a/Doc/lib/libstdtypes.tex Fri Aug 18 02:42:14 2000 +0000 +++ b/Doc/lib/libstdtypes.tex Fri Aug 18 03:12:38 2000 +0000 @@ -105,8 +105,8 @@ \lineiii{>}{strictly greater than}{} \lineiii{>=}{greater than or equal}{} \lineiii{==}{equal}{} + \lineiii{!=}{not equal}{(1)} \lineiii{<>}{not equal}{(1)} - \lineiii{!=}{not equal}{(1)} \lineiii{is}{object identity}{} \lineiii{is not}{negated object identity}{} \end{tableiii} @@ -313,7 +313,7 @@ \subsection{Sequence Types \label{typesseq}} There are six sequence types: strings, Unicode strings, lists, -tuples, buffers, and ranges. +tuples, buffers, and xrange objects. Strings literals are written in single or double quotes: \code{'xyzzy'}, \code{"frobozz"}. See chapter 2 of the @@ -327,9 +327,9 @@ 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 support by Python syntax, but can created by calling the -builtin function \function{buffer()}.\bifuncindex{buffer} Ranges are -similar to buffers in that there is no specific syntax to create them, -but they are created using the \function{xrange()} +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} \indexii{sequence}{types} \indexii{string}{type} @@ -337,6 +337,7 @@ \indexii{buffer}{type} \indexii{tuple}{type} \indexii{list}{type} +\indexii{xrange}{type} Sequence types support the following operations. The \samp{in} and \samp{not in} operations have the same priorities as the comparison @@ -638,18 +639,18 @@ \refstmodindex{re} -\subsubsection{Range Type \label{typesseq-range}} +\subsubsection{XRange Type \label{typesseq-xrange}} -The range\indexii{range}{type} type is an immutable sequence which is -commonly used for looping. The advantage of the range type is that a -range object will always take the same amount of memory, no matter the +The xrange\indexii{xrange}{type} type is an immutable sequence which is +commonly used for looping. The advantage of the xrange type is that an +xrange object will always take the same amount of memory, no matter the size of the range it represents. There are no consistent performance advantages. -Range objects behave like tuples, and offer a single method: +XRange objects behave like tuples, and offer a single method: -\begin{methoddesc}[range]{tolist}{} - Return a list object which represents the same values as the range +\begin{methoddesc}[xrange]{tolist}{} + Return a list object which represents the same values as the xrange object. \end{methoddesc} @@ -1112,8 +1113,8 @@ \subsubsection{Internal Objects \label{typesinternal}} See the \citetitle[../ref/ref.html]{Python Reference Manual} for this -information. It describes code objects, stack frame objects, -traceback objects, and slice objects. +information. It describes stack frame objects, traceback objects, and +slice objects. \subsection{Special Attributes \label{specialattrs}}
