Python version
3.13.5
Package version
0.35.0
Current behavior (bug description)
If one of the values of the grouping key contains the path separator, it ends up in the key of the output.
from benedict import benedict
d = benedict({'users': [{'name': 'I.have.dots', 'age': 23}, {'name': 'Blabla', 'age': 42}]})
d.groupby('users', by_key='name')
Output: {'I.have.dots': [{'name': 'I.have.dots', 'age': 23}], 'Blabla': [{'name': 'Blabla', 'age': 42}]}
Expected behavior
I would expect it to raise an error.
Thanks!
Python version
3.13.5
Package version
0.35.0
Current behavior (bug description)
If one of the values of the grouping key contains the path separator, it ends up in the key of the output.
Output:
{'I.have.dots': [{'name': 'I.have.dots', 'age': 23}], 'Blabla': [{'name': 'Blabla', 'age': 42}]}Expected behavior
I would expect it to raise an error.
Thanks!