On Tue, Nov 16, 2010 at 8:47 AM, Armin Rigo <[email protected]> wrote: > Hi, > > On Tue, Nov 16, 2010 at 5:27 PM, Dan Stromberg <[email protected]> > wrote: > >> So, if I understand correctly you are saying that we should rename our > >> dbm.py to bsdb.py, and write a new dbm.py which can use either bsdb or > gdbm? > > > > I think it's anydbm that can use whatever among dbm, bsddb, gdbm and > > dumbdbm, as it sees fit. TTBoMK, it's not until python 3.x that dbm > becomes > > a sort of unifying module hierarchy. > > Yes, in Python 2.x, dbm.py is very specifically an interface to the > Unix dbm library (see e.g. man dbm_open). At the level of C, the gdbm > interface is some kind of extension of that. It's not related to > bsddb, which has a very different interface. >
Well, there's related, and then there's related. bsddb provides a bunch of operations, including a basic hash facility. The API is not intended to be the same as gdbm or ndbm (gdbm has a native interface and an ndbm compatability interface), but the concept is similar between the 3 for one part of bsddb - the part the cpython uses.
_______________________________________________ [email protected] http://codespeak.net/mailman/listinfo/pypy-dev
