[Python-Dev] xrange vs generators
Mon, 25 Jun 2001 17:05:09 +0200
> > I _was_ using xrange as sets representing (potentially large)
> > ranges of ints.
> > Example:
> > positive = xrange(1, sys.maxint)
> > if num in positive:
> > ...
> > I didt follow the iterators discussion: would this
> > continue to work?
> No, it would break.
Since there was a off-by-one bug for 'if num in xrange()'
in Pyhon2.0 my code already has been rewritten.