3 ms·
this is cool! i use a lot of defaultdict trees[1], and convert nested dicts to/from flat dicts with dots in their keys[2]. never underestimate the mighty dict
by nathants 3y ago
this is cool!
i use a lot of defaultdict trees[1], and convert nested dicts to/from flat dicts with dots in their keys[2].
never underestimate the mighty dict.
1. https://github.com/nathants/py-util/blob/6844917fb51e9d24de130fd4728053d62c7946da/util/dicts.py#L92 https://github.com/nathants/py-util/blob/6844917fb51e9d24de1...
2. https://github.com/nathants/py-util/blob/6844917fb51e9d24de130fd4728053d62c7946da/tests/test_dicts.py#L95 https://github.com/nathants/py-util/blob/6844917fb51e9d24de1...