[Zope-dev] ZCatalog.Lazy.Lazy.__getslice__ broken

Dan L. Pierson dan@control.com
Tue, 24 Jul 2001 16:30:24 -0400


Here's the Collector report I just filed:

Using a slice operation like [30:] on a ZCatalog search
result causes a MemoryError because the __getslice__
implementation uses:

    for i in range(i1,i2):

The __getslice__ spec says that a missing second argument
will be replaced by sys.maxint!

I think that the fix is to simply replace range with xrange.