Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib/python3.7/site-packages/future/backports/urllib/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/future/backports/urllib/__pycache__/response.cpython-37.pyc

B

�A�[l�@spdZddlmZmZmZddlmZGdd�de�ZGdd�de�ZGdd	�d	e�Z	Gd
d�de�Z
[[[[dS)
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.
�)�absolute_import�division�unicode_literals)�objectc@s@eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)�addbasez(Base class for addinfo and addclosehook.cCsV||_|jj|_|jj|_t|jd�r0|jj|_t|jd�rH|jj|_n
dd�|_dS)N�	readlines�filenocSsdS)N�r	r	r	�Q/opt/alt/python37/lib/python3.7/site-packages/future/backports/urllib/response.py�<lambda>�z"addbase.__init__.<locals>.<lambda>)�fp�read�readline�hasattrrr)�selfr
r	r	r
�__init__s


zaddbase.__init__cCs
t|j�S)N)�iterr
)rr	r	r
�__iter__szaddbase.__iter__cCsd|jjt|�|jfS)Nz<%s at %r whose fp = %r>)�	__class__�__name__�idr
)rr	r	r
�__repr__%szaddbase.__repr__cCs>|jr|j��d|_d|_d|_d|_d|_d|_d|_dS)N)r
�closerrrrr�__next__)rr	r	r
r)s
z
addbase.closecCs|jdkrtd��|S)NzI/O operation on closed file)r
�
ValueError)rr	r	r
�	__enter__4s
zaddbase.__enter__cCs|��dS)N)r)r�type�value�	tracebackr	r	r
�__exit__9szaddbase.__exit__N)
r�
__module__�__qualname__�__doc__rrrrrr r	r	r	r
rs
rc@s eZdZdZdd�Zdd�ZdS)�addclosehookz*Class to add a close hook to an open file.cGst�||�||_||_dS)N)rr�	closehook�hookargs)rr
r%r&r	r	r
r?szaddclosehook.__init__cCs,|jr|j|j�d|_d|_t�|�dS)N)r%r&rr)rr	r	r
rDs
zaddclosehook.closeN)rr!r"r#rrr	r	r	r
r$<sr$c@s eZdZdZdd�Zdd�ZdS)�addinfoz.class to add an info() method to an open file.cCst�||�||_dS)N)rr�headers)rr
r(r	r	r
rNszaddinfo.__init__cCs|jS)N)r()rr	r	r
�infoRszaddinfo.infoN)rr!r"r#rr)r	r	r	r
r'Ksr'c@s2eZdZdZddd�Zdd�Zdd�Zd	d
�ZdS)�
addinfourlz9class to add info() and geturl() methods to an open file.NcCs"t�||�||_||_||_dS)N)rrr(�url�code)rr
r(r+r,r	r	r
rXszaddinfourl.__init__cCs|jS)N)r()rr	r	r
r)^szaddinfourl.infocCs|jS)N)r,)rr	r	r
�getcodeaszaddinfourl.getcodecCs|jS)N)r+)rr	r	r
�geturldszaddinfourl.geturl)N)rr!r"r#rr)r-r.r	r	r	r
r*Us

r*N)r#�
__future__rrrZfuture.builtinsrrr$r'r*r	r	r	r
�<module>s1


Hacked By AnonymousFox1.0, Coded By AnonymousFox