ó ¹Ö#Wc@sUdZddlZddlmZdejfd„ƒYZdefd„ƒYZdS( sP requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. iÿÿÿÿNi(t OrderedDicttCaseInsensitiveDictcBskeZdZd 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 ``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(Rt_storetNonetupdate(tselftdatatkwargs((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pyt__init__,s   cCs||f|j|jƒ>s(Rtvalues(R((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pyt__iter__=scCs t|jƒS(N(tlenR(R((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pyt__len__@scCsd„|jjƒDƒS(s.Like iteritems(), but with all lowercase keys.css%|]\}}||dfVqdS(iN((Rtlowerkeytkeyval((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pys Fs(Rtitems(R((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pyt lower_itemsCscCsGt|tjƒr!t|ƒ}ntSt|jƒƒt|jƒƒkS(N(t isinstancet collectionstMappingRtNotImplementedtdictR(Rtother((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pyt__eq__KscCst|jjƒƒS(N(RRR(R((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pytcopyTscCstt|jƒƒƒS(N(tstrRR(R((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pyt__repr__WsN(t__name__t __module__t__doc__RRR R RRRRR R!R#(((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pyRs        t LookupDictcBs8eZdZdd„Zd„Zd„Zdd„ZRS(sDictionary lookup object.cCs ||_tt|ƒjƒdS(N(tnametsuperR'R(RR(((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pyR]s cCs d|jS(Ns (R((R((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pyR#ascCs|jj|dƒS(N(t__dict__tgetR(RR ((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pyR dscCs|jj||ƒS(N(R*R+(RR tdefault((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pyR+isN(R$R%R&RRR#R R+(((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pyR'Zs    (R&RtcompatRtMutableMappingRRR'(((sD/opt/alt/python27/lib/python2.7/site-packages/requests/structures.pyt s J