%PDF- %PDF-
Direktori : /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/ |
Current File : //opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyc |
� �wMVc @ ss d d l m Z d d l m Z d e d d d d d d d d g � f d � � YZ d � Z d � Z d � Z d S( i����( t namedtuplei ( t LocationParseErrort Urlt schemet autht hostt portt patht queryt fragmentc B s_ e Z d Z d Z d d d d d d d d � Z e d � � Z e d � � Z e d � � Z RS( sg Datastructure for representing an HTTP URL. Used as a return value for :func:`parse_url`. c C s+ t t | � j | | | | | | | | � S( N( t superR t __new__( t clsR R R R R R R ( ( s_ /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyR s c C s | j S( s@ For backwards-compatibility with urlparse. We're nice like that.( R ( t self( ( s_ /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyt hostname s c C s6 | j p d } | j d k r2 | d | j 7} n | S( s) Absolute path including the query string.t /t ?N( R R t None( R t uri( ( s_ /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyt request_uri s c C s$ | j r d | j | j f S| j S( s( Network location including host and ports %s:%d( R R ( R ( ( s_ /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyt netloc s ( N( t __name__t __module__t __doc__t slotsR R t propertyR R R ( ( ( s_ /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyR s c C s� d } d } xV | D]N } | j | � } | d k r: q n | d k sR | | k r | } | } q q W| d k s} | d k r� | d d f S| | | | d | f S( s� Given a string and an iterable of delimiters, split on the first found delimiter. Return two split parts and the matched delimiter. If not found, then the first part is the full input string. Example: :: >>> split_first('foo/bar?baz', '?/=') ('foo', 'bar?baz', '/') >>> split_first('foo/bar?baz', '123') ('foo/bar?baz', '', None) Scales linearly with number of delims. Not ideal for large number of delims. i t i N( R t find( t st delimst min_idxt min_delimt dt idx( ( s_ /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyt split_first'