dictgetlike
dictgetlike is a programming utility concept used to retrieve values from a dictionary by matching keys to a pattern rather than accessing a single exact key. It is commonly employed in situations where keys follow naming conventions or when a subset of keys must be selected based on partial information, such as configuration options, templates, or data extraction tasks. The function typically returns either a new dictionary of matched items or a list of the corresponding values, depending on the API.
A typical dictgetlike interface accepts a source dictionary, a pattern, and optional flags such as case sensitivity,
In Python, a common approach uses dictionary comprehension with a pattern matcher (for example, fnmatch for
See also: dictionary, pattern matching, wildcard, regular expression, fnmatch, glob.