-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeated keys #40
Comments
Woah, looks like a bug to me. Interestingly, it is not present in >>> marisa_trie.Trie(["foo", "foo"]).keys()
['foo']
>>> marisa_trie.BytesTrie([("foo", b"1"), ("foo", b"2")]).keys()
['foo', 'foo'] |
@superbobry By the way I understood why this happens: for i in range(0, ag.key().length()):
if raw_key[i] == self._c_value_separator:
key = raw_key[:i].decode('utf8') And then you add the same key to the |
This will output [u'1', u'1'].
I guess, that, this function should returns a [u'1']
I'm ready to fix it, if someone consider, that this is bug.
The text was updated successfully, but these errors were encountered: