Commit 5b1e5600 authored by Michel Pelletier's avatar Michel Pelletier

added KWMultiMapping, another appendage from ZTables

parent abf30b1c
...@@ -91,6 +91,7 @@ from intSet import intSet ...@@ -91,6 +91,7 @@ from intSet import intSet
from SearchIndex import UnIndex, UnTextIndex, UnKeywordIndex, Query from SearchIndex import UnIndex, UnTextIndex, UnKeywordIndex, Query
from SearchIndex.Lexicon import Lexicon from SearchIndex.Lexicon import Lexicon
import regex, pdb import regex, pdb
from MultiMapping import MultiMapping
from string import lower from string import lower
import Record import Record
from Missing import MV from Missing import MV
...@@ -104,6 +105,14 @@ class NoBrainer: ...@@ -104,6 +105,14 @@ class NoBrainer:
""" """
pass pass
class KWMultiMapping(MultiMapping):
def has_key(self, name):
try:
r=self[name]
return 1
except KeyError:
return 0
def orify(seq, def orify(seq,
query_map={ query_map={
type(regex.compile('')): Query.Regex, type(regex.compile('')): Query.Regex,
......
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