You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: