8000 Duplicate keys in BytesDAWG · Issue #16 · pytries/DAWG · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Duplicate keys in BytesDAWG #16

8000
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

Open
EgorLakomkin opened this issue Apr 18, 2014 · 2 comments
Open

Duplicate keys in BytesDAWG #16

EgorLakomkin opened this issue Apr 18, 2014 · 2 comments

Comments

@EgorLakomkin
Copy link

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']
@kmike
Copy link
Member
kmike commented Apr 18, 2014

Hi @EgorLakomkin,

I think it makes sense not to return duplicate keys. PRs are welcome :)

@EgorLakomkin
Copy link
Author

Ok, I thought it was made intentionally. I will work on PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0