Displaying 1 result from an estimated 1 matches for "mymatchspy".
Did you mean:
matchspy
2010 Dec 01
2
Using a subclass of MatchSpy in Python bindings
...le to find a
solution to this. I want to subclass a MatchSpy in the Python bindings
and have Enquire use it. However, when I try to do so, I get a
TypeError raised. The following example illustrates this:
>>> import xapian
>>> database = xapian.Database(dbpath)
>>> class MyMatchSpy(xapian.MatchSpy):
... def __init__(self):
... pass
... def __call__(self, *args, **kw):
... print "called with", args, kw
...
>>> ms = MyMatchSpy()
>>> enquire = xapian.Enquire(database)
>>> enquire.add_matchspy(ms)
Traceback (mos...