????
Your IP : 3.135.192.183
3
\��@s^dZddlZddddgZGdd�dej�ZGdd�de�ZGd d�de�ZGd
d�de�ZdS)aResponse 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.
�N�addbase�addclosehook�addinfo�
addinfourlcs8eZdZdZ�fdd�Zdd�Zdd�Zdd �Z�ZS)
rzOBase class for addinfo and addclosehook. Is a good idea for garbage collection.cs tt|�j|ddd�||_dS)Nz<urllib response>F)�delete)�superr�__init__�fp)�selfr )� __class__��'/usr/lib64/python3.6/urllib/response.pyrszaddbase.__init__cCsd|jjt|�|jfS)Nz<%s at %r whose fp = %r>)r�__name__�id�file)r
rrr
�__repr__szaddbase.__repr__cCs|jjrtd��|S)NzI/O operation on closed file)r �closed�
ValueError)r
rrr
� __enter__szaddbase.__enter__cCs|j�dS)N)�close)r
�type�value� tracebackrrr
�__exit__!szaddbase.__exit__) r�
__module__�__qualname__�__doc__rrrr�
__classcell__rr)rr
rs
cs,eZdZdZ�fdd�Z�fdd�Z�ZS)rz*Class to add a close hook to an open file.cs tt|�j|�||_||_dS)N)rrr� closehook�hookargs)r
r rr)rrr
r(szaddclosehook.__init__cs>z(|j}|j}|r&d|_d|_||�Wdtt|�j�XdS)N)rrrrr)r
rr)rrr
r-szaddclosehook.close)rrrrrrrrr)rr
r%scs(eZdZdZ�fdd�Zdd�Z�ZS)rz.class to add an info() method to an open file.cstt|�j|�||_dS)N)rrr�headers)r
r r )rrr
r<szaddinfo.__init__cCs|jS)N)r )r
rrr
�info@szaddinfo.info)rrrrrr!rrr)rr
r9scs2eZdZdZd �fdd� Zdd�Zdd�Z�ZS)
rz9class to add info() and geturl() methods to an open file.Ncs"tt|�j||�||_||_dS)N)rrr�url�code)r
r r r"r#)rrr
rGszaddinfourl.__init__cCs|jS)N)r#)r
rrr
�getcodeLszaddinfourl.getcodecCs|jS)N)r")r
rrr
�geturlOszaddinfourl.geturl)N)rrrrrr$r%rrr)rr
rDs)rZtempfile�__all__Z_TemporaryFileWrapperrrrrrrrr
�<module>s