redditwarp.http.util.case_insensitive_dict#

class redditwarp.http.util.case_insensitive_dict.CaseInsensitiveDict(data: Mapping[str, V] | None = None, **kwargs: V)[source]#

Bases: MutableMapping[str, V]

A case-folding, case-preserving dictionary.

Entries are stored as if str.casefold() was called on the key.

Iterators producing keys will contain case-sensitive keys since the casing of the last key supplied when setting is retained. However, as expected, lookups and membership checks are not case-sensitive, as are comparisons with other mappings.