[Python-Dev] bsddb module and unicode - is it worth it?

Martin v. Loewis martin@v.loewis.de
09 May 2002 09:48:12 +0200


Skip Montanaro <skip@pobox.com> writes:

> I just noticed the bsddb module barfs on Unicode objects.  Is it worth
> updating it to handle them transparently?  Or does the "explicit is better
> than implicit" rubric hold here?

bsddb implements a byte-string keys, byte-string values mapping; see

http://www.sleepycat.com/docs/api_cxx/dbt_class.html

If you want anything else (such as text), you'll need to use shelve,
or define your own mapping from bytes to your data types.

Regards,
Martin