DAWG
DAWG copied to clipboard
Duplicate keys in BytesDAWG
I need to store multiple values by the same key. When I tryed to use BytesDAWG and invoke keys I receive multiple equal keys. Is this correct behaviour?
Here is an example:
import dawg
data = [(u'key1', b'value1'), (u'key2', b'value2'), (u'key1', b'value3')]
bytes_dawg = dawg.BytesDAWG(data)
keys = bytes_dawg.keys( u'key1' )
print keys
The output is:
[u'key1', u'key1']
Hi @EgorLakomkin,
I think it makes sense not to return duplicate keys. PRs are welcome :)
Ok, I thought it was made intentionally. I will work on PR :)