[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndex - TextIndex.py:1.23.2.1

Andreas Jung andreas@zope.com
Wed, 2 Jan 2002 11:17:19 -0500


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndex
In directory cvs.zope.org:/tmp/cvs-serv27373

Modified Files:
      Tag: Zope-2_5-branch
	TextIndex.py 
Log Message:
merge from trunk


=== Zope/lib/python/Products/PluginIndexes/TextIndex/TextIndex.py 1.23 => 1.23.2.1 ===
 
 
-import string, re
+import  re
 import operator,warnings
 from Globals import Persistent,DTMLFile
 from zLOG import LOG, ERROR
@@ -480,7 +480,7 @@
         r = None
 
         for key in record.keys:
-            key = string.strip(key)
+            key = key.strip()
             if not key:
                 continue
 
@@ -662,7 +662,7 @@
 def parse(s):
     """Parse parentheses and quotes"""
     l = []
-    tmp = string.lower(s)
+    tmp = s.lower()
 
     p = parens(tmp)
     while p is not None:
@@ -727,9 +727,9 @@
 
 
 def quotes(s):
-    split=string.split
+
     if '"' not in s:
-        return split(s)
+        return s.split()
     
     # split up quoted regions
     splitted = re.split('\s*\"\s*', s)
@@ -738,7 +738,7 @@
     
     for i in range(1,len(splitted),2):
         # split the quoted region into words
-        words = splitted[i] = split(splitted[i])
+        words = splitted[i] = splitted[i].split()
         
         # put the Proxmity operator in between quoted words
         j = len(words) - 1
@@ -749,7 +749,7 @@
     i = len(splitted) - 1
     while i >= 0:
         # split the non-quoted region into words
-        splitted[i:i+1] = split(splitted[i])
+        splitted[i:i+1] = splitted[i].split()
         i = i - 2
 
     return filter(None, splitted)