Viewing File: /usr/lib/python3.6/site-packages/pip/_vendor/html5lib/__pycache__/_inputstream.cpython-36.opt-1.pyc
3
aj ) @ s d dl mZmZmZ d dlmZmZ d dlmZm Z d dl
Z
d dlZd dlm
Z
ddlmZmZmZmZ ddlmZ dd lmZ d d
lmZ yd dlmZ W n ek
r eZY nX edd
eD Zedd
eD Zedd
eD ZeeddgB ZdZej r(ej!eddF e"d d Z#n
ej!eZ#e$dddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4g Z%ej!d5Z&i Z'G d6d7 d7e(Z)d8d9 Z*G d:d; d;e(Z+G d<d= d=e+Z,G d>d? d?e-Z.G d@dA dAe(Z/G dBdC dCe(Z0dDdE Z1dS )G )absolute_importdivisionunicode_literals) text_typebinary_type)http_clienturllibN)webencodings )EOFspaceCharactersasciiLettersasciiUppercase)ReparseException)_utils)StringIO)BytesIOc C s g | ]}|j d qS )ascii)encode).0item r "/usr/lib/python3.6/_inputstream.py
<listcomp> s r c C s g | ]}|j d qS )r )r )r r r r r r s c C s g | ]}|j d qS )r )r )r r r r r r s > <u [----]z"\uD800-\uDFFF"]i i i i i i i i i i i i i i i i i i i
i
i i i i i
i
i i i i i i z[ -
-/:-@[-`{-~]c @ sH e Zd ZdZdd Zdd Zdd Zdd Zd
d Zdd
Z dd Z
dS )BufferedStreamzBuffering for streams that do not have buffering of their own
The buffer is implemented as a list of chunks on the assumption that
joining many strings will be slow since it is O(n**2)
c C s || _ g | _ddg| _d S )Nr
r )streambufferposition)selfr r r r __init__@ s zBufferedStream.__init__c C s@ d}x(| j d | jd D ]}|t|7 }qW || jd 7 }|S )Nr r
)r r! len)r"