Check out what the dbm-based modules do. I believe they use strings for keys and bytes for values, and if the keys are unicode, it converts them to UTF-8.
On 6/19/07, Brett Cannon <[EMAIL PROTECTED]> wrote: > After reading Guido's blog post and noticing his comment about lack of > delegation, I decided to delegate to myself a look at struni and what > tests were failing (which turned out to be a lot). > > I just started at the beginning and so that meant looking at > test_anydbm. That's failing because _bsddb.c requires PyInt_Check or > PyString_Check to pass for keys. That doesn't work in a world where > string constants are all Unicode. =) > > So, my question is how best to handle this test (and thus other tests > like it). Should it just continue to fail until someone fixes > _bsddb.c to accept Unicode keys (and thus start up a FAILING file > listing the various tests that are failing and doc which ones are > expected to fail until something specific changes)? Or do we silence > the failure by making the constants pass through str8? Or should str8 > not even be used at all since (I assume) it won't survive the merge > back into p3yk? > > -Brett > _______________________________________________ > Python-3000 mailing list > Python-3000@python.org > http://mail.python.org/mailman/listinfo/python-3000 > Unsubscribe: > http://mail.python.org/mailman/options/python-3000/guido%40python.org > -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com