We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Original error:
In [4]: unflatten({1: ('a', 'b'), 2: ('a', 'b')}, inverse=True) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-4-9f138cfe18d2> in <module> ----> 1 unflatten({1: ('a', 'b'), 2: ('a', 'b')}, inverse=True) ~/projects/flatten-dict/flatten_dict/flatten_dict.py in unflatten(d, splitter, inverse) 122 flat_key, value = value, flat_key 123 key_tuple = splitter(flat_key) --> 124 nested_set_dict(unflattened_dict, key_tuple, value) 125 126 return unflattened_dict ~/projects/flatten-dict/flatten_dict/flatten_dict.py in nested_set_dict(d, keys, value) 91 return 92 d = d.setdefault(key, {}) ---> 93 nested_set_dict(d, keys[1:], value) 94 95 ~/projects/flatten-dict/flatten_dict/flatten_dict.py in nested_set_dict(d, keys, value) 87 if len(keys) == 1: 88 if key in d: ---> 89 raise ValueError("duplicated key '{}'".format(key)) 90 d[key] = value 91 return ValueError: duplicated key 'b'
Expected error:
ValueError: duplicated key ('a', 'b')
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Original error:
Expected error:
The text was updated successfully, but these errors were encountered: