File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -354,3 +354,15 @@ \section{Built-in Functions}
354354>>> if type(x) == type(''): print 'It is a string'
355355\end {verbatim }\ecode
356356\end {funcdesc }
357+
358+ \begin {funcdesc }{xrange}{start\, end\, step}
359+ This function is very similar to \code {range()}, but returns an
360+ `` xrange object'' instead of a list. This is an opaque sequence type
361+ which yields the same values as the corresponding list, without
362+ actually storing them all simultaneously. The advantage of
363+ \code {xrange()} over \code {range()} is minimal (since \code {xrange()}
364+ still has to create the values when asked for them) except when a very
365+ large range is used on a memory-starved machine (e.g. DOS) or when all
366+ of the range's elements are never used (e.g. when the loop is usually
367+ terminated with \code {break}).
368+ \end {funcdesc }
Original file line number Diff line number Diff line change @@ -354,3 +354,15 @@ \section{Built-in Functions}
354354>>> if type(x) == type(''): print 'It is a string'
355355\end {verbatim }\ecode
356356\end {funcdesc }
357+
358+ \begin {funcdesc }{xrange}{start\, end\, step}
359+ This function is very similar to \code {range()}, but returns an
360+ `` xrange object'' instead of a list. This is an opaque sequence type
361+ which yields the same values as the corresponding list, without
362+ actually storing them all simultaneously. The advantage of
363+ \code {xrange()} over \code {range()} is minimal (since \code {xrange()}
364+ still has to create the values when asked for them) except when a very
365+ large range is used on a memory-starved machine (e.g. DOS) or when all
366+ of the range's elements are never used (e.g. when the loop is usually
367+ terminated with \code {break}).
368+ \end {funcdesc }
You can’t perform that action at this time.
0 commit comments