7.2.6.13. stack_nested_keys¶
-
stack_nested_keys
(nested_dict, key=(), depth=-1)[source]¶ Stacks the keys of nested-dictionaries into tuples and yields a list of k-v pairs.
Parameters: - nested_dict (dict) – Nested dictionary.
- key (tuple, optional) – Initial keys.
- depth (int, optional) – Maximum keys depth.
Returns: List of k-v pairs.
Return type: generator