On Sun, Sep 07, 2008 at 02:35:58PM -0700, Gregory P. Smith wrote:
> On Thu, Sep 4, 2008 at 11:30 AM, Brett Cannon <[EMAIL PROTECTED]> wrote:
> > Another thing to keep in mind with the whole shelve/dbm.any argument
> > is that for 3.1 there is nothing saying we can't change shelve and the
> > dbm package to allow 3rd-party code to register with the dbm package
> > such that bsddb can be used as needed behind the scenes.
> 
> Exactly.  That is what I think should really happen here.

   I will try to find a spare time to some job in the area. I am planning
API like this (in terms of Python 2.x with anydbm):

# dbm.something module
import anydbm
anydbm.register('something', whichdb_test_function)

   whichdb_test_function is not required - whichdb module can provide
a generic test function:

def generic_test(filename, module_name):
    module = __import__(module_name)
    try:
        module.open(filename)
    except:
        return False
    else:
        return True

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to