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

Check for list #7

Closed glenncoppens closed 6 years ago

glenncoppens commented 8 years ago

Hi

I have this use case where I know a certain key to check against, but I don't know yet if the value for that key is going to be a list or not (a simple string, int,...).

So I was thinking if there could be an easy way to check whether a key will be a list, so I can get all the items in the list by iterating over the key and appending ":0", ..., ":n"

Tnx :)

gmr commented 6 years ago

Not sure I follow, sorry. Closing due to age. If still interested, please provide a snipped of Python code that shows what you would like to be able to do.