[Zope-CVS] CVS: Products/ZCTextIndex - Index.py:1.1.2.41
Guido van Rossum
guido@python.org
Tue, 14 May 2002 11:06:46 -0400
Update of /cvs-repository/Products/ZCTextIndex
In directory cvs.zope.org:/tmp/cvs-serv8528
Modified Files:
Tag: TextIndexDS9-branch
Index.py
Log Message:
_intersection() would croak on an empty L.
=== Products/ZCTextIndex/Index.py 1.1.2.40 => 1.1.2.41 ===
def _intersection(self, L):
+ if not L:
+ return IIBTree()
d2w, weight = L[0]
dummy, result = weightedUnion(IIBTree(), d2w, 1, weight)
for d2w, weight in L[1:]:
@@ -149,7 +151,7 @@
return result
def _union(self, L):
- # XXX This can be optimized, see ParseTree.OrNode.executeQuery()
+ # XXX This can be optimized, see OkapiIndex
result = IIBTree()
for d2w, weight in L:
dummy, result = weightedUnion(result, d2w, 1, weight)