Tc@sEdZddlZdejfdYZdefdYZdS(sP requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. iNtCaseInsensitiveDictcBskeZdZd dZdZdZdZdZdZ dZ dZ d Z d Z RS( s 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. cKs5t|_|dkr!i}n|j||dS(N(tdictt_storetNonetupdate(tselftdatatkwargs((s7/usr/lib/python2.7/site-packages/requests/structures.pyt__init__*s   cCs||f|j|j<s(Rtvalues(R((s7/usr/lib/python2.7/site-packages/requests/structures.pyt__iter__;scCs t|jS(N(tlenR(R((s7/usr/lib/python2.7/site-packages/requests/structures.pyt__len__>scCsd|jjDS(s.Like iteritems(), but with all lowercase keys.css%|]\}}||dfVqdS(iN((Rtlowerkeytkeyval((s7/usr/lib/python2.7/site-packages/requests/structures.pys Ds(Rtitems(R((s7/usr/lib/python2.7/site-packages/requests/structures.pyt lower_itemsAscCsGt|tjr!t|}ntSt|jt|jkS(N(t isinstancet collectionstMappingRtNotImplementedRR(Rtother((s7/usr/lib/python2.7/site-packages/requests/structures.pyt__eq__IscCst|jjS(N(RRR(R((s7/usr/lib/python2.7/site-packages/requests/structures.pytcopyRscCstt|jS(N(tstrRR(R((s7/usr/lib/python2.7/site-packages/requests/structures.pyt__repr__UsN(t__name__t __module__t__doc__RRR R RRRRRR R"(((s7/usr/lib/python2.7/site-packages/requests/structures.pyRs        t LookupDictcBs8eZdZddZdZdZddZRS(sDictionary lookup object.cCs ||_tt|jdS(N(tnametsuperR&R(RR'((s7/usr/lib/python2.7/site-packages/requests/structures.pyR[s cCs d|jS(Ns (R'(R((s7/usr/lib/python2.7/site-packages/requests/structures.pyR"_scCs|jj|dS(N(t__dict__tgetR(RR ((s7/usr/lib/python2.7/site-packages/requests/structures.pyR bscCs|jj||S(N(R)R*(RR tdefault((s7/usr/lib/python2.7/site-packages/requests/structures.pyR*gsN(R#R$R%RRR"R R*(((s7/usr/lib/python2.7/site-packages/requests/structures.pyR&Xs    (R%RtMutableMappingRRR&(((s7/usr/lib/python2.7/site-packages/requests/structures.pyt s J