[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG - BaseStopWords.py:1.1.2.9
Andreas Jung
andreas@digicool.com
Thu, 14 Feb 2002 17:55:22 -0500
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG
In directory cvs.zope.org:/tmp/cvs-serv10561
Modified Files:
Tag: ajung-textindexng-branch
BaseStopWords.py
Log Message:
removed unnecessary functions from base class
replaced internal OOBTree by dict (needed for new stopwords loop)
=== Zope/lib/python/Products/PluginIndexes/TextIndexNG/BaseStopWords.py 1.1.2.8 => 1.1.2.9 ===
def __init__(self, words={}):
- self._words = OOBTree()
+ self._words = {}
if isinstance(words,DictType):
self._words.update(words)
@@ -41,17 +41,12 @@
else:
raise ValueError
- def keys(self): return self._words.keys()
- def values(self): return self._words.values()
- def items(self):
- """ blabla"""
- return self._words.items()
- def has_key(self,k): return self._words.has_key(k)
- def get(self,k): return self._words.get(k)
+ def getDict(self): return self._words
def __len__(self): return len(self._words)
def __delitem__(self,k): del self._words[k]
+
def __setitem__(self,k,v):
k = k.strip()
@@ -90,5 +85,3 @@
self[ l ] = None
return d
-
-