a æ…YÄ ã@s>dZddlZddlmZGdd„dejƒZGdd„deƒZdS) zO requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. éNé)Ú OrderedDictc@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 ``collections.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 ú:/Users/ymaher/Downloads/lambdas_org/requests/structures.pyÚ__init__*szCaseInsensitiveDict.__init__cCs||f|j| ¡<dSr©rÚlower)rÚkeyÚvaluer r r Ú __setitem__0szCaseInsensitiveDict.__setitem__cCs|j| ¡dS)Nrr©rrr r r Ú __getitem__5szCaseInsensitiveDict.__getitem__cCs|j| ¡=dSrrrr r r Ú __delitem__8szCaseInsensitiveDict.__delitem__cCsdd„|j ¡DƒS)Ncss|]\}}|VqdSrr )Ú.0ZcasedkeyZ mappedvaluer r r Ú <óz/CaseInsensitiveDict.__iter__..)rÚvalues©rr 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 )rZlowerkeyZkeyvalr r r rCsÿz2CaseInsensitiveDict.lower_items..)rÚitemsrr r r Ú lower_itemsAsýzCaseInsensitiveDict.lower_itemscCs2t|tjƒrt|ƒ}ntSt| ¡ƒt| ¡ƒkSr)Ú isinstanceÚ collectionsÚMappingrÚNotImplementedÚdictr)rÚotherr r r Ú__eq__Is  zCaseInsensitiveDict.__eq__cCst|j ¡ƒSr)rrrrr r r ÚcopyRszCaseInsensitiveDict.copycCstt| ¡ƒƒSr)Ústrr$rrr r r Ú__repr__UszCaseInsensitiveDict.__repr__)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__r rrrrrrr&r'r)r r r r rs  rcs<eZdZdZd ‡fdd„ Zdd„Zdd„Zd d d „Z‡ZS) Ú LookupDictzDictionary lookup object.Ncs||_tt|ƒ ¡dSr)ÚnameÚsuperr.r )rr/©Ú __class__r r r \szLookupDict.__init__cCs d|jS)Nz )r/rr r r r)`szLookupDict.__repr__cCs|j |d¡Sr©Ú__dict__Úgetrr r r rcszLookupDict.__getitem__cCs|j ||¡Srr3)rrÚdefaultr r r r5hszLookupDict.get)N)N) r*r+r,r-r r)rr5Ú __classcell__r r r1r r.Ys r.)r-r!ÚcompatrÚMutableMappingrr$r.r r r r Ús J