[Zope3-checkins] CVS: Zope3/src/zope/app/index - adapters.py:1.3

Anthony Baxter anthony@interlink.com.au
Sat, 2 Aug 2003 13:22:07 -0400


Update of /cvs-repository/Zope3/src/zope/app/index
In directory cvs.zope.org:/tmp/cvs-serv4702

Modified Files:
	adapters.py 
Log Message:
Must return an IISet or else intersecting with other results will break.


=== Zope3/src/zope/app/index/adapters.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/index/adapters.py:1.2	Mon Jul 14 04:31:12 2003
+++ Zope3/src/zope/app/index/adapters.py	Sat Aug  2 13:22:01 2003
@@ -1,4 +1,5 @@
 from zope.index.interfaces import IQuerying, ISimpleQuery
+from zodb.btrees.IIBTree import IISet
 
 
 class SimpleQuery:
@@ -10,5 +11,6 @@
 
     def query(self, term, start=0, count=None):
         reslist, count = self._index.query(term, start, count)
-        reslist = [ x[0] for x in reslist ]
+        # Not really optimal, this. May be a better way?
+        reslist = IISet([ x[0] for x in reslist ])
         return reslist