ó  fH^c@sRdZddlmZmZmZdefd„ƒYZdefd„ƒYZdS(sO requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. i(t OrderedDicttMappingtMutableMappingtCaseInsensitiveDictcBskeZdZd d„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z RS( sÖ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. cKs5tƒ|_|dkr!i}n|j||dS(N(Rt_storetNonetupdate(tselftdatatkwargs((srequests/structures.pyt__init__(s   cCs||f|j|jƒ:s(Rtvalues(R((srequests/structures.pyt__iter__9scCs t|jƒS(N(tlenR(R((srequests/structures.pyt__len__<scCsd„|jjƒDƒS(s.Like iteritems(), but with all lowercase keys.css%|]\}}||dfVqdS(iN((Rtlowerkeytkeyval((srequests/structures.pys Bs(Rtitems(R((srequests/structures.pyt lower_items?scCsDt|tƒrt|ƒ}ntSt|jƒƒt|jƒƒkS(N(t isinstanceRRtNotImplementedtdictR(Rtother((srequests/structures.pyt__eq__GscCst|jjƒƒS(N(RRR(R((srequests/structures.pytcopyPscCstt|jƒƒƒS(N(tstrRR(R((srequests/structures.pyt__repr__SsN(t__name__t __module__t__doc__RR RRRRRRR R!R#(((srequests/structures.pyR s        t LookupDictcBs8eZdZdd„Zd„Zd„Zdd„ZRS(sDictionary lookup object.cCs ||_tt|ƒjƒdS(N(tnametsuperR'R (RR(((srequests/structures.pyR Zs cCs d|jS(Ns (R((R((srequests/structures.pyR#^scCs|jj|dƒS(N(t__dict__tgetR(RR ((srequests/structures.pyRascCs|jj||ƒS(N(R*R+(RR tdefault((srequests/structures.pyR+fsN(R$R%R&RR R#RR+(((srequests/structures.pyR'Ws    N(R&tcompatRRRRRR'(((srequests/structures.pytsJ