Skip to content
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

get doesn't work when the key is a list with one element. #5

Closed
mathiasrabe opened this issue Jan 3, 2020 · 2 comments
Closed

get doesn't work when the key is a list with one element. #5

mathiasrabe opened this issue Jan 3, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mathiasrabe
Copy link

mathiasrabe commented Jan 3, 2020

Python version
3.7.4

Package version
0.14.0

Current behavior (bug description)
I tried the following:

from benedict import benedict

key = ['1', '2']
dictionary = {'1' : {'2' : 'two'}}
d = benedict(dictionary)
print(d.get(key))

key = ['1']
dictionary = {'1' : 'one'}
d = benedict(dictionary)
print(d.get(key))

'two' will be printed but 'one' not. I get an type error: TypeError: unhashable type: 'list'

Expected behavior
I expected that the last command will print 'one'.

@mathiasrabe mathiasrabe added the bug Something isn't working label Jan 3, 2020
@fabiocaccamo
Copy link
Owner

@mathiasrabe thanks for reporting this, I will fix it as soon as possible.

@fabiocaccamo
Copy link
Owner

You can install 0.14.1 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants