[Zope-Checkins] CVS: Packages/SearchIndex - UnTextIndex.py:1.51
Evan Simpson
evan@zope.com
Wed, 15 Aug 2001 16:51:54 -0400
Update of /cvs-repository/Packages/SearchIndex
In directory cvs.zope.org:/tmp/cvs-serv13687
Modified Files:
UnTextIndex.py
Log Message:
Merge bugfix from Zope-2_4-branch
=== Packages/SearchIndex/UnTextIndex.py 1.50 => 1.51 ===
"""Find operators and operands"""
isop = operator_dict.has_key
- i = len(q) - 1
- while i >= 0:
+ i = 0
+ while i < len(q):
e = q[i]
if isinstance(e, ListType):
q[i] = parse2(e, default_operator)
if i % 2:
q.insert(i, default_operator)
+ i = i + 1
elif i % 2:
# This element should be an operator
if isop(e):
@@ -699,7 +700,8 @@
else:
# Insert the default operator.
q.insert(i, default_operator)
- i = i - 1
+ i = i + 1
+ i = i + 1
return q