A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-September/082249.html below:

[Python-Dev] 3rd-party dbms

[Python-Dev] 3rd-party dbms [Python-Dev] 3rd-party dbmsBrett Cannon brett at python.org
Thu Sep 4 21:03:07 CEST 2008
On Thu, Sep 4, 2008 at 11:59 AM, Oleg Broytmann <phd at phd.pp.ru> wrote:
> Brett Cannon <brett at python.org> wrote:
>> 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.
>
>   Many years ago I wrote toy hashes based on ZODB and MetaKit. Registering
> them with anydbm was easy:
>
> import anydbm
> anydbm._names.insert(len(anydbm._names)-1, ['ZODBhash', 'MKhash'])
>            # Insert before dumbdbm
>
>   More complex part was to make whichdb to recognize those hashes. I just
> monkey-patched whichdb. If I were doing this now I'd do something similar
> to atexit module - every hash module will register its own test function,
> and whichdb will call them in turn until it finds which db it is.
>

That's what I figured could happen. And give dbm.any a public API to
register with it instead of setting a private attribute.

-Brett
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4