[Spambayes] Current version

Neale Pickett neale@woozle.org
Mon Nov 25 20:37:43 2002


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!


> 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!




More information about the Spambayes mailing list