[Spambayes] Current version
Paul Moore
lists@morpheus.demon.co.uk
Mon Nov 25 22:37:53 2002
(I wish I'd read this before I posted my last message :-))
Neale Pickett <neale@woozle.org> writes:
> So then, "Moore, Paul" <Paul.Moore@atosorigin.com> is all like:
>
>> I'd rather you didn't. I can't (immediately) see a simple way
>> to customize shelve to use (say) pybsddb. Let me have a play
>> tonight, and I'll see if I can make it customizable as it
>> stands.
>
> Okay. In the meantime, I've taken the iteritems stuff out of dbdict. I
> blew away Classifier.update_probabilities(), which was the only thing
> left that needed it. Beaujolais!
Ah. As long as Classifier.update_probabilities() is history, iterators
aren't needed. Neat.
>> I'm assuming from what you say that I can simply rip out
>> the __iter__ and iter* methods? In fact, if so, it's pretty
>> simple. Just change "import anydbm" to
>>
>> from Options import options
>> # Whatever name seems appropriate - the default
>> # value should be 'anydbm'
>> DBM_METHOD = options.dbm_implementation_method
>> dbm = __import__(DBM_METHOD)
>>
>> and then use dbm in place of anydbm.
>>
>> For pybsddb, we may need an adapter class to supply the
>> right set of methods, but that's not hard, and then it's
>> just a case of
>>
>> [dbdict]
>> dbm_method=pybsd_wrapper
>>
>> in bayescustomize.ini if the user wants to go this way.
>
> I like that. You go, Paul!
OK, ignore my previous message (well, laugh at me a bit for using the
wrong database format, if you like :-)). I'll implement this (probably
tomorrow).
Patch to follow. Is a posting to the list OK, or should I upload it to
SF? (No CVS commit ability, and I wouldn't know what to do if I had it
:-))
Paul.
--
This signature intentionally left blank
More information about the Spambayes
mailing list