ok
Direktori : /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/ |
Current File : //opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyo |
� �2{Yc @ sw d Z d d l Z d d l Z d d l m Z d e f d � � YZ d e j f d � � YZ d e f d � � YZ d S( sP requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. i����N( t islicet IteratorProxyc B s2 e Z d Z d � Z d � Z d � Z d � Z RS( s docstring for IteratorProxyc C s | | _ d S( N( t i( t selfR ( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyt __init__ s c C s | j S( N( R ( R ( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyt __iter__ s c C sj t | j d � r t | j � St | j d � r; | j j St | j d � rf t j | j j � � j Sd S( Nt __len__t lent fileno( t hasattrR R t ost fstatR t st_size( R ( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyR s c C s d j t | j d | � � S( Nt ( t joinR R t None( R t n( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyt read! s ( t __name__t __module__t __doc__R R R R ( ( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyR s t CaseInsensitiveDictc B sk e Z d Z d d � Z d � Z d � Z d � Z d � Z d � 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. c K s5 t � | _ | d k r! i } n | j | | � d S( N( t dictt _storeR t update( R t datat kwargs( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyR A s c C s | | f | j | j � <d S( N( R t lower( R t keyt value( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyt __setitem__G s c C s | j | j � d S( Ni ( R R ( R R ( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyt __getitem__L s c C s | j | j � =d S( N( R R ( R R ( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyt __delitem__O s c C s d � | j j � D� S( Nc s s | ] \ } } | Vq d S( N( ( t .0t casedkeyt mappedvalue( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pys <genexpr>S s ( R t values( R ( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyR R s c C s t | j � S( N( R R ( R ( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyR U s c C s d � | j j � D� S( s. Like iteritems(), but with all lowercase keys.c s s% | ] \ } } | | d f Vq d S( i N( ( R! t lowerkeyt keyval( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pys <genexpr>[ s ( R t items( R ( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyt lower_itemsX s c C sG t | t j � r! t | � } n t St | j � � t | j � � k S( N( t isinstancet collectionst MappingR t NotImplementedR R( ( R t other( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyt __eq__` s c C s t | j j � � S( N( R R R$ ( R ( ( sP /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/structures.pyt copyi s c C s t t | j � � � S( N( t strR R'