Skip to content

schola.core.utils.nested_get

Function Definition

schola.core.utils.nested_get(dct, keys, default)

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

Parameters

dct

Type: NestedDict[K, V]
The dictionary to search.

keys

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

default

Type: V
The value to return if the key is not found.

Returns

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

Return type: V