Open
Description
I haven't tried to find all the corner cases, but a dictionary that has a list of lists with a value that is a dict, will correctly convert the inner dict into an Addict. However, when converting back to a pure dict with to_dict()
the inner Addict is not converted.
addict version 2.4 in Python 3.12
from addict import Dict
orig = {'list': [[{'d': 1}]]}
conv = Dict(orig)
assert(isinstance(conv.list[0][0], Dict)) # Passes - inner dict becomes a Dict
final = conv.to_dict()
inner_dict = final['list'][0][0]
assert(not isinstance(inner_dict, Dict)) # Fails - inner dict is still a Dict
Metadata
Metadata
Assignees
Labels
No labels