[Zope-Checkins] CVS: Zope2 - Catalog.py:1.74.4.1

Brian Lloyd brian@digicool.com
Fri, 6 Jul 2001 13:58:01 -0400 (EDT)


Update of /cvs-repository/Zope2/lib/python/Products/ZCatalog
In directory korak.digicool.com:/home/brian/temp/zope-24-branch/lib/python/Products/ZCatalog

Modified Files:
      Tag: Zope-2_4-branch
	Catalog.py 
Log Message:
committed a missed checkin to speed up LazyCats



--- Updated File Catalog.py in package Zope2 --
--- Catalog.py	2001/06/01 15:05:30	1.74
+++ Catalog.py	2001/07/06 17:58:00	1.74.4.1
@@ -664,7 +664,7 @@
             if sort_index is None: r=r[0]
             else: r=r[0][1]
         else:
-            if sort_index is None: r=LazyCat(r)
+            if sort_index is None: r=LazyCat(r, len(r))
             else:
                 r.sort()
                 if kw.has_key('sort-order'):
@@ -677,7 +677,7 @@
                 if (type(so) is type('') and
                     lower(so) in ('reverse', 'descending')):
                     r.reverse()
-                r=LazyCat(map(lambda i: i[1], r))
+                r=LazyCat(map(lambda i: i[1], r), len(r))
 
         return r