IntSpan?
Don Garrett
garrett at bgb.cc
Thu Mar 21 15:54:47 EST 2002
Chris Liechti wrote:
> using xrange instead of range does not allocate a list but generates
> the vaulues when they're needed.
>
> chris
While xrange is an excellent optimization in some cases, it's not quite the
same thing as a list, so there are a number of things you can't do that seem
relevant.
For a non-working example:
xrange(1, 500) + xrange(600, 700)
--
Don Garrett http://www.bgb.cc/garrett/
BGB Consulting garrett at bgb.cc
More information about the Python-list
mailing list