Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
python35
/
lib
/
python3.5
/
site-packages
/
requests
/
__pycache__
/
File Content:
structures.cpython-35.pyc
��#W� � @ sU d Z d d l Z d d l m Z Gd d � d e j � Z Gd d � d e � Z d S) zP requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. � N� )�OrderedDictc @ s� e Z d Z d Z d d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d S)�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. Nc K s2 t � | _ | d k r i } | j | | � d S)N)r �_store�update)�self�data�kwargs� r �/structures.py�__init__, s zCaseInsensitiveDict.__init__c C s | | f | j | j � <d S)N)r �lower)r �key�valuer r r �__setitem__2 s zCaseInsensitiveDict.__setitem__c C s | j | j � d S)Nr )r r )r r r r r �__getitem__7 s zCaseInsensitiveDict.__getitem__c C s | j | j � =d S)N)r r )r r r r r �__delitem__: s zCaseInsensitiveDict.__delitem__c C s d d � | j j � D� S)Nc s s | ] \ } } | Vq d S)Nr )�.0ZcasedkeyZmappedvaluer r r � <genexpr>>