gmr / flatdict

Python module for interacting with nested dicts as a single level dict with delimited keys.
https://flatdict.readthedocs.io
BSD 3-Clause "New" or "Revised" License
111 stars 32 forks source link

FlatterDict conversion to dict results in AttributeError #41

Open sergray opened 4 years ago

sergray commented 4 years ago
>>> import flatdict
>>> flatdict.FlatterDict({'l': [{'b':'c'}, 'd']}).as_dict()
python3.7/site-packages/flatdict.py in _child_as_list(self, pk, ck): 474
AttributeError: 'str' object has no attribute 'original_type'
>>> flatdict.__version__                                                                           
'4.0.1'

The error is caused by 'd' item in the list. It happens also if the item in the original list is an int or float