inserting Unicode character in dictionary - Python
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Fri Oct 17 13:24:35 EDT 2008
On Fri, 17 Oct 2008 13:07:38 -0400, gita ziabari wrote:
> The following code does not work for unicode characters:
>
> keyword = dict()
> kw = 'генских'
> keyword.setdefault(key, []).append (kw)
>
> It works fine for inserting ASCII character. Any suggestion?
What do you mean by "does not work"? And you are aware that the above
snipped doesn't involve any unicode characters!? You have a byte string
there -- type `str` not `unicode`.
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list