[pypy-dev] gdbm

Dan Stromberg drsalists at gmail.com
Tue Nov 16 17:27:03 CET 2010

On Tue, Nov 16, 2010 at 4:17 AM, Antonio Cuni <anto.cuni at gmail.com> wrote:

> On 16/11/10 03:17, Dan Stromberg wrote:
>> Yes, the dbm module in pypy is basically like the bsddb module in cpython.
>> cpython includes modules for bsddb, gdbm, and more.
>> I tend to prefer gdbm over bsddb, because I've seen bsddb databases get
>> corrupt too many times - EG, when a filesystem overflows.  bsddb might be
>> a
>> little faster though; I've never compared their performance.
> 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.

> Sounds fine, do you feel like implementing it? :-)
> Moreover, I also agree with amaury that your code is very similar to the
> one in the current dbm.py, so we should maybe try to refactor things to
> share common parts between the twos.
I'd be happy to.

Would sharing based on inheritance or a more functional approach be
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20101116/197ef989/attachment.html>

More information about the Pypy-dev mailing list