marisa-trie icon indicating copy to clipboard operation
marisa-trie copied to clipboard

Unable to add string values to RecordTrie

Open joshhu opened this issue 2 years ago • 0 comments

The code is in the following

keys = [u'1', u'12', u'13', u'123', u'132', u'1234']
vals = [u'a', u'b', u'c', u'd', u'e', u'f']
fmt = "s"
trie = marisa_trie.RecordTrie("s", zip(keys, map(vals, str.encode)))

But I still get

TypeError: 'method_descriptor' object is not iterable

Anyone can help?

joshhu avatar Aug 21 '22 08:08 joshhu