Class taken from: requests
Implements all methods and operations of
collections.MutableMapping as well as dict’s
All keys are expected to be strings. The structure remembers the
case of the last key to be set, and
will contain case-sensitive keys. However, querying and contains
testing is case insensitive:
cid = CaseInsensitiveDict() cid['Accept'] = 'application/json' cid['aCCEPT'] == 'application/json' # True list(cid) == ['Accept'] # True
headers['content-encoding'] will return the
value of a
'Content-Encoding' response header, regardless
of how the header name was originally stored.
If the constructor,
.update, or equality comparison
operations are given keys that have equal
.lower() s, the
behavior is undefined.
A great amount of time has been spent creating, crafting and maintaining this software, please consider donating.
Donating helps ensure continued support, development and availability.
comments powered by Disqus