a Æ*Na½ ã@sDdZddlmZddlmZmZGdd„deƒZGdd„deƒZd S) zO requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. é)Ú OrderedDicté)ÚMappingÚMutableMappingc@sbeZdZdZddd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dd„Z dd„Z dS)ÚCaseInsensitiveDictaÖA case-insensitive ``dict``-like object. Implements all methods and operations of ``MutableMapping`` as well as dict's ``copy``. Also provides ``lower_items``. All keys are expected to be strings. The structure remembers the case of the last key to be set, and ``iter(instance)``, ``keys()``, ``items()``, ``iterkeys()``, and ``iteritems()`` 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 For example, ``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. NcKs*tƒ|_|duri}|j|fi|¤ŽdS©N)rÚ_storeÚupdate)ÚselfÚdataÚkwargs©r ún/private/var/folders/js/6pj4vh5d4zd0k6bxv74qrbhr0000gr/T/pip-target-22xwyzbs/lib/python/requests/structures.pyÚ__init__*szCaseInsensitiveDict.__init__cCs||f|j| ¡<dSr©rÚlower)r ÚkeyÚvaluer r rÚ __setitem__0szCaseInsensitiveDict.__setitem__cCs|j| ¡dS)Nrr©r rr r rÚ __getitem__5szCaseInsensitiveDict.__getitem__cCs|j| ¡=dSrrrr r rÚ __delitem__8szCaseInsensitiveDict.__delitem__cCsdd„|j ¡DƒS)Ncss|]\}}|VqdSrr )Ú.0ÚcasedkeyÚ mappedvaluer r rÚ <óz/CaseInsensitiveDict.__iter__..)rÚvalues©r r r rÚ__iter__;szCaseInsensitiveDict.__iter__cCs t|jƒSr)Úlenrrr r rÚ__len__>szCaseInsensitiveDict.__len__cCsdd„|j ¡DƒS)z.Like iteritems(), but with all lowercase keys.css|]\}}||dfVqdS)rNr )rÚlowerkeyÚkeyvalr r rrCsÿz2CaseInsensitiveDict.lower_items..)rÚitemsrr r rÚ lower_itemsAsýzCaseInsensitiveDict.lower_itemscCs0t|tƒrt|ƒ}ntSt| ¡ƒt| ¡ƒkSr)Ú isinstancerrÚNotImplementedÚdictr%)r Úotherr r rÚ__eq__Is  zCaseInsensitiveDict.__eq__cCst|j ¡ƒSr)rrrrr r rÚcopyRszCaseInsensitiveDict.copycCstt| ¡ƒƒSr)Ústrr(r$rr r rÚ__repr__UszCaseInsensitiveDict.__repr__)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrrrr!r%r*r+r-r r r rrs  rcs<eZdZdZd ‡fdd„ Zdd„Zdd„Zd d d „Z‡ZS) Ú LookupDictzDictionary lookup object.Ncs||_tt|ƒ ¡dSr)ÚnameÚsuperr2r)r r3©Ú __class__r rr\szLookupDict.__init__cCs d|jS)Nz )r3rr r rr-`szLookupDict.__repr__cCs|j |d¡Sr©Ú__dict__Úgetrr r rrcszLookupDict.__getitem__cCs|j ||¡Srr7)r rÚdefaultr r rr9hszLookupDict.get)N)N) r.r/r0r1rr-rr9Ú __classcell__r r r5rr2Ys r2N) r1Ú collectionsrÚcompatrrrr(r2r r r rÚs J