Skip to content

id_manager.nested_get

Full path: schola.core.utils.id_manager.nested_get

schola.core.utils.id_manager.nested_get

nested_get

nested_get(dct, keys, default)

Get a value from a nested dictionary, returning a default value if the key is not found.

Parameters

dct (NestedDict[K,V]) : The dictionary to search.

keys (Iterable[K]) : The keys to search for in the dictionary.

default (V) : The value to return if the key is not found.

Returns

The value found in the dictionary, or the default value if the key is not found.

Return type: V