Commit 7fb9697d authored by Michel Pelletier's avatar Michel Pelletier

Changed _init to __init__, aliased _init for b/w compatability

parent 335b4edd
......@@ -84,7 +84,7 @@
##############################################################################
"""Simple column indices"""
__version__='$Revision: 1.18 $'[11:-2]
__version__='$Revision: 1.19 $'[11:-2]
from Globals import Persistent
from BTree import BTree
......@@ -107,7 +107,7 @@ def nonEmpty(s):
class Index(Persistent):
"""Index object interface"""
def _init(self,data,schema,id):
def __init__(self,data,schema,id):
"""Create an index
The arguments are:
......@@ -127,6 +127,9 @@ class Index(Persistent):
self._reindex()
# for b/w compatability
_init = __init__
def dpHasUniqueValuesFor(self, name):
' has unique values for column NAME '
if name == self.id:
......
......@@ -202,7 +202,7 @@ Notes on a new text index design
space.
"""
__version__='$Revision: 1.13 $'[11:-2]
__version__='$Revision: 1.14 $'[11:-2]
from Globals import Persistent
import BTree, IIBTree
......@@ -217,7 +217,7 @@ import string, regex, regsub
class TextIndex(Persistent):
def _init(self,data,schema,id):
def __init__(self,data,schema,id):
"""Create an index
The arguments are:
......@@ -237,6 +237,9 @@ class TextIndex(Persistent):
self._syn=stop_word_dict
self._reindex()
# for backwards compatability
_init = __init__
def clear(self):
self._index=BTree()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment