Re @s\dZddlmZddlmZmZGdddeZGdddeZd S) zO requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. ) OrderedDict)MappingMutableMappingc@seZdZdZdddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ dS)CaseInsensitiveDictaA 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. NcKs2t|_|dkri}|j||dS)N)r_storeupdate)selfdatakwargsr /builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/structures.py__init__*s  zCaseInsensitiveDict.__init__cCs||f|j|j<sz/CaseInsensitiveDict.__iter__..)rvalues)r r r r __iter__;szCaseInsensitiveDict.__iter__cCs t|jS)N)lenr)r r r r __len__>szCaseInsensitiveDict.__len__cCsdd|jjDS)z.Like iteritems(), but with all lowercase keys.css%|]\}}||dfVqdS)rNr )rlowerkeykeyvalr r r rDsz2CaseInsensitiveDict.lower_items..)ritems)r r r r lower_itemsAs zCaseInsensitiveDict.lower_itemscCsDt|trt|}ntSt|jt|jkS)N) isinstancerrNotImplementeddictr )r otherr r r __eq__IszCaseInsensitiveDict.__eq__cCst|jjS)N)rrr)r r r r copyRszCaseInsensitiveDict.copycCstt|jS)N)strr#r)r r r r __repr__UszCaseInsensitiveDict.__repr__)__name__ __module__ __qualname____doc__rrrrrrr r%r&r(r r r r rs        rcsReZdZdZdfddZddZddZdd d ZS) LookupDictzDictionary lookup object.Ncs ||_tt|jdS)N)namesuperr-r)r r.) __class__r r r\s zLookupDict.__init__cCs d|jS)Nz )r.)r r r r r(`szLookupDict.__repr__cCs|jj|dS)N)__dict__get)r rr r r rcszLookupDict.__getitem__cCs|jj||S)N)r1r2)r rdefaultr r r r2hszLookupDict.get)r)r*r+r,rr(rr2r r )r0r r-Ys   r-N) r, collectionsrcompatrrrr#r-r r r r sJ