fabiocaccamo / python-benedict

:blue_book: dict subclass with keylist/keypath support, built-in I/O operations (base64, csv, html, ini, json, pickle, plist, query-string, toml, xls, xml, yaml), s3 support and many utilities.
MIT License
1.49k stars 49 forks source link

Disable keylist feature? #413

Open fabiocaccamo opened 4 months ago

fabiocaccamo commented 4 months ago

Discussed in https://github.com/fabiocaccamo/python-benedict/discussions/412

Originally posted by **BearAndBunny** May 22, 2024 Is it possible to disable the keylist feature? Using tuples as keys with the usual syntax does not work: ``` from benedict import benedict x = benedict() x[("a", True)] = "test" print(x) x = benedict() x.update({("a", True): "test"}) #works, but clumsy syntax print(x) y = dict() y[("a", True)] = "test" print(y) ``` Output: ``` {'a': [None, 'test']} {('a', True): 'test'} {('a', True): 'test'} ``` ## Upvote & Fund - We're using [Polar.sh](https://polar.sh/fabiocaccamo) so you can upvote and help fund this issue. - We receive the funding once the issue is completed & confirmed by you. - Thank you in advance for helping prioritize & fund our backlog. Fund with Polar