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
112 stars 32 forks source link

Fix bug when calling as_dict on empty dict #57

Open tgh19 opened 12 months ago

tgh19 commented 12 months ago

print(FlatDict({'a': {}}).as_dict())

should produce

{'a': {}}

but instead produces

{'a': <FlatDict id=139834437272912 {}>"}

This change fixes the functionality to print the former.