ok

Mini Shell

Direktori : /lib/python3.6/site-packages/urllib3/packages/backports/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/urllib3/packages/backports/__pycache__/makefile.cpython-36.pyc

3

nf�\��@s&dZddlZddlmZddd�ZdS)z�
backports.makefile
~~~~~~~~~~~~~~~~~~

Backports the Python 3 ``socket.makefile`` method for use with anything that
wants to create a "fake" socket object.
�N)�SocketIO�rc
Cst|�dddhks td|f��d|k}d|kp4|}|sB|sBt�d|k}d}	|rZ|	d7}	|rf|	d7}	t||	�}
|jd7_|dkr�d
}|dkr�tj}|dkr�|s�td	��|
S|r�|r�tj|
|
|�}n&|r�tj|
|�}n|s�t�tj	|
|�}|r�|Stj
||||�}||_|S)z:
    Backport of ``socket.makefile`` from Python 3.5.
    r�w�bz&invalid mode %r (only r, w, b allowed)��Nrz!unbuffered streams must be binary���)�set�
ValueError�AssertionErrorrZ_makefile_refs�io�DEFAULT_BUFFER_SIZE�BufferedRWPair�BufferedReader�BufferedWriter�
TextIOWrapper�mode)
�selfr�	buffering�encoding�errors�newlineZwritingZreadingZbinaryZrawmode�raw�buffer�text�r�/usr/lib/python3.6/makefile.py�backport_makefilesB
r)rNNNN)�__doc__rZsocketrrrrrr�<module>s

Zerion Mini Shell 1.0