Add utility functions for working with nested dictionary keys.
Review Request #13993 — Created June 23, 2024 and submitted
A pattern that crops up from time to time is the need to work with
nested dictionary keys, setting or retrieving something deep in a
dictionary while handling type conflicts and avoiding unwanted
alteration of data.This introduces two
dict_get_path_value()
anddict_set_path_value()
for working with this pattern. These standard methods can be used to
more easily work with path-based key management in dictionaries.
Unit tests pass.
Summary | ID |
---|---|
91496adb36fb1733fb92c8926698fc4f6e0cfa29 |
Description | From | Last Updated |
---|---|---|
ValueError seems more appropriate. |
david |