;
ะโ"Ic               @   sV   d  Z  Gd   d e  Z Gd   d e  Z Gd   d e  Z Gd   d e  Z d	 S(
   u  Response classes used by urllib.

The base class, addbase, defines a minimal file-like interface,
including read() and readline().  The typical response object is an
addinfourl instance, which defines an info() method that returns
headers and a geturl() method that returns the url.
c             B   s/   |  Ee  Z d  Z d   Z d   Z d   Z d S(   u(   Base class for addinfo and addclosehook.c             C   sฯ   | |  _  |  j  j |  _ |  j  j |  _ t |  j  d  o |  j  j |  _ n t |  j  d  o |  j  j |  _ n d   |  _ t |  j  d  o9 |  j  j |  _ t |  j  d  o |  j  j |  _ qห n d  S(   Nu	   readlinesu   filenoc               S   s   d  S(   N(   u   None(    (    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   <lambda>   s    u   __iter__u   __next__(   u   fpu   readu   readlineu   hasattru	   readlinesu   filenou   __iter__u   __next__(   u   selfu   fp(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   __init__   s    	 c             C   s    d |  j  j t |   |  j f S(   Nu   <%s at %r whose fp = %r>(   u	   __class__u   __name__u   idu   fp(   u   self(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   __repr__   s    c             C   sL   d  |  _ d  |  _ d  |  _ d  |  _ |  j o |  j j   n d  |  _ d  S(   N(   u   Noneu   readu   readlineu	   readlinesu   filenou   fpu   close(   u   self(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   close"   s    				
 N(   u   __name__u
   __module__u   __doc__u   __init__u   __repr__u   close(   u
   __locals__(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   addbase	   s   
		u   addbasec             B   s&   |  Ee  Z d  Z d   Z d   Z d S(   u*   Class to add a close hook to an open file.c             G   s&   t  j |  |  | |  _ | |  _ d  S(   N(   u   addbaseu   __init__u	   closehooku   hookargs(   u   selfu   fpu	   closehooku   hookargs(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   __init__-   s    	c             C   sA   t  j |   |  j o& |  j |  j   d  |  _ d  |  _ n d  S(   N(   u   addbaseu   closeu	   closehooku   hookargsu   None(   u   self(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   close2   s
    
	N(   u   __name__u
   __module__u   __doc__u   __init__u   close(   u
   __locals__(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   addclosehook*   s   
	u   addclosehookc             B   s&   |  Ee  Z d  Z d   Z d   Z d S(   u.   class to add an info() method to an open file.c             C   s   t  j |  |  | |  _ d  S(   N(   u   addbaseu   __init__u   headers(   u   selfu   fpu   headers(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   __init__<   s    c             C   s   |  j  S(   N(   u   headers(   u   self(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   info@   s    N(   u   __name__u
   __module__u   __doc__u   __init__u   info(   u
   __locals__(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   addinfo9   s   
	u   addinfoc             B   s;   |  Ee  Z d  Z d d  Z d   Z d   Z d   Z d S(   u9   class to add info() and geturl() methods to an open file.c             C   s/   t  j |  |  | |  _ | |  _ | |  _ d  S(   N(   u   addbaseu   __init__u   headersu   urlu   code(   u   selfu   fpu   headersu   urlu   code(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   __init__F   s    		c             C   s   |  j  S(   N(   u   headers(   u   self(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   infoL   s    c             C   s   |  j  S(   N(   u   code(   u   self(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   getcodeO   s    c             C   s   |  j  S(   N(   u   url(   u   self(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   geturlR   s    N(   u   __name__u
   __module__u   __doc__u   Noneu   __init__u   infou   getcodeu   geturl(   u
   __locals__(    (    u,   /mit/python/lib/python3.0/urllib/response.pyu
   addinfourlC   s
   
		u
   addinfourlN(   u   __doc__u   objectu   addbaseu   addclosehooku   addinfou
   addinfourl(    (    (    u,   /mit/python/lib/python3.0/urllib/response.pyu   <module>   s   !
