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

Andreas Jung Andreas Jung" <andreas@andreas-jung.com
Tue, 24 Jul 2001 16:43:27 -0500


just fixed in trunk and branch.
Andreas

----- Original Message ----- 
From: "Dan L. Pierson" <dan@control.com>
To: <zope-dev@zope.org>
Sent: Dienstag, 24. Juli 2001 15:30
Subject: [Zope-dev] ZCatalog.Lazy.Lazy.__getslice__ broken


> 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.
> 
> 
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>