[Python-3000] Bytes and unicode conversion in C extensions
Jesus Cea
jcea at jcea.es
Thu Aug 14 07:10:00 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
M.-A. Lemburg wrote:
| Since bsddb is about storing arbitrary data, I think just accepting
| bytes for both keys and values is more intuitive.
Agreed. This is the approach I've done in current code.
| The question of encoding is application and database specific, so
| not something you'd want to put into a low-level interface.
Agreed.
| BTW: If you make the database object subclassable, an application
| could easily implement whatever strategy is needed on top of the
| bytes-only interface.
Current pybsddb code don't allow subclassing or adding new attibutes to
a given instance. I will (probably) work on this for a future pybsddb
version. Pointers to references to do this kind of magic welcomed :-)
- --
Jesus Cea Avion _/_/ _/_/_/ _/_/_/
jcea at jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/
jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/_/_/_/
. _/_/ _/_/ _/_/ _/_/ _/_/
"Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/
"My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQCVAwUBSKO+KJlgi5GaxT1NAQL+dgP+PRVTPmAhvsK+qkUqb32K8/tsMwb+HKV2
lR5Tn6w0bLRLARvVAfcNKtXfkJZo/IAqJFUrAE8JlNZlnMWyL3+A67oj0Aghi2ft
K82ysrMNh/wd+QkBg1kavrJOrbrBeswupBsDAIjrRvbKhIDbOzCkAbzz7P6eG97d
Qxck/l+wu6A=
=ceBz
-----END PGP SIGNATURE-----
More information about the Python-3000
mailing list