arigo at tunes.org
Tue Nov 16 17:47:35 CET 2010
On Tue, Nov 16, 2010 at 5:27 PM, Dan Stromberg <drsalists at gmail.com> 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.
> Would sharing based on inheritance or a more functional approach be
I think either is fine (or even not sharing at all if it turns out to
be too much of a mess in practice).
More information about the Pypy-dev