Hacked By AnonymousFox

Current Path : /opt/alt/python36/lib64/python3.6/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/__pycache__/pprint.cpython-36.opt-2.pyc

3

��2a|Q�
@s�ddlZddlZddlZddlZddlmZ	ddddddgZ
d dd�d
d�Zd!dd�dd�Zdd�Z
dd�Zdd�ZGdd�d�Zdd�ZGdd�d�Zdd�Zeeeeeeeeed�h�Zdd�Zd"dd�Zdd�Z e!dkr�e�dS)#�N)�StringIO�pprint�pformat�
isreadable�isrecursive�saferepr�
PrettyPrinter��PF)�compactcCs t|||||d�}|j|�dS)N)�stream�indent�width�depthr)rr)�objectrr
rrrZprinter�r�+/opt/alt/python36/lib64/python3.6/pprint.pyr/scCst||||d�j|�S)N)r
rrr)rr)rr
rrrrrrr7scCst|idd�dS)Nr)�
_safe_repr)rrrrr<scCst|idd�dS)Nrr	)r)rrrrr@scCst|idd�dS)Nr�)r)rrrrrDsc@s"eZdZdgZdd�Zdd�ZdS)�	_safe_key�objcCs
||_dS)N)r)�selfrrrr�__init__Tsz_safe_key.__init__cCsRy|j|jkStk
rLtt|j��t|j�ftt|j��t|j�fkSXdS)N)r�	TypeError�str�type�id)r�otherrrr�__lt__Ws
z_safe_key.__lt__N)�__name__�
__module__�__qualname__�	__slots__rrrrrrrHs
rcCst|d�t|d�fS)Nrr	)r)�trrr�_safe_tuple^sr$c@s�eZdZd:dd�dd�Zdd	�Zd
d�Zdd
�Zdd�Zdd�ZiZ	dd�Z
e
e	ej<dd�Z
e
e	ejj<dd�Zee	ej<dd�Zee	ej<dd�Zee	ej<ee	ej<dd�Zee	ej<dd�Zee	ej<d d!�Zee	ej<d"d#�Zee	ejj<d$d%�Z d&d'�Z!d(d)�Z"d*d+�Z#d,d-�Z$e$e	ej%j<d.d/�Z&e&e	ej'j<d0d1�Z(e(e	ej)j<d2d3�Z*e*e	ej+j<d4d5�Z,e,e	ej-j<d6d7�Z.e.e	ej/j<d8d9�Z0e0e	ej1j<dS);rr	r
NF)rcCs|t|�}t|�}|dkr td��|dk	r8|dkr8td��|sDtd��||_||_||_|dk	rf||_ntj|_t|�|_	dS)Nrzindent must be >= 0zdepth must be > 0zwidth must be != 0)
�int�
ValueError�_depth�_indent_per_level�_width�_stream�_sys�stdout�bool�_compact)rr
rrrrrrrrcszPrettyPrinter.__init__cCs&|j||jddid�|jjd�dS)Nr�
)�_formatr*�write)rrrrrr�szPrettyPrinter.pprintcCs"t�}|j||ddid�|j�S)Nr)�	_StringIOr0�getvalue)rrZsiorrrr�szPrettyPrinter.pformatcCs|j|idd�dS)Nrr)�format)rrrrrr�szPrettyPrinter.isrecursivecCs |j|idd�\}}}|o|S)Nr)r4)rr�s�readable�	recursiverrrr�szPrettyPrinter.isreadablec	Cs�t|�}||kr.|jt|��d|_d|_dS|j|||�}|j||}	t|�|	kr�|jj	t
|�jd�}
|
dk	r�d||<|
|||||||d�||=dSt|t
�r�d||<|j||||||d�||=dS|j|�dS)NTFr	)rr1�
_recursion�
_recursive�	_readable�_reprr)�len�	_dispatch�getr�__repr__�
isinstance�dict�_pprint_dict)rrrr
�	allowance�context�level�objid�rep�	max_width�prrrr0�s,
zPrettyPrinter._formatc
Csj|j}|d�|jdkr*||jdd�t|�}|r^t|j�td�}	|j|	|||d||�|d�dS)N�{r	� )�key�})r1r(r<�sorted�itemsr$�_format_dict_items)
rrrr
rCrDrEr1ZlengthrOrrrrB�s
zPrettyPrinter._pprint_dictcCslt|�s|jt|��dS|j}|j|jd�|jt|j��||t|j�d|d||�|jd�dS)N�(r	�))r<r1�repr�	__class__rr0�listrO)rrrr
rCrDrE�clsrrr�_pprint_ordered_dict�sz"PrettyPrinter._pprint_ordered_dictcCs0|jd�|j||||d||�|jd�dS)N�[r	�])r1�
_format_items)rrrr
rCrDrErrr�_pprint_list�s
zPrettyPrinter._pprint_listcCsH|jd�t|�dkrdnd}|j||||t|�||�|j|�dS)NrQr	z,)rR)r1r<rZ)rrrr
rCrDrE�endcharrrr�
_pprint_tuple�s

zPrettyPrinter._pprint_tuplec	Cs�t|�s|jt|��dS|j}|tkr8|jd�d}n&|j|jd�d}|t|j�d7}t|td�}|j||||t|�||�|j|�dS)NrJrMz({z})r	)rL)	r<r1rSrT�setrrNrrZ)	rrrr
rCrDrE�typr\rrr�_pprint_set�s
zPrettyPrinter._pprint_setcCs�|j}t|�s|t|��dSg}|jd�}	|dkrD|d7}|d7}|j|}
}x�t|	�D]�\}}
t|
�}|t|	�dkr�|
|8}
t|�|
kr�|j|�q\tjd|
�}|j	�|}d}xtt|�D]h\}}||}|t|�dkr�|t|	�dkr�||8}tt|��|k�r&|�r |jt|��|}q�|}q�W|r\|jt|��q\Wt|�dk�r^||�dS|dk�rp|d�x8t|�D],\}}|dk�r�|dd|�||��qzW|dk�r�|d	�dS)
NTr	z\S*\s*�rQrr/rKrR)
r1r<rS�
splitlinesr)�	enumerate�append�re�findall�pop)rrrr
rCrDrEr1�chunks�linesZ
max_width1rH�i�linerG�partsZ
max_width2�current�j�part�	candidaterrr�_pprint_str�sT
 


zPrettyPrinter._pprint_strcCs�|j}t|�dkr"|t|��dS|dk}|rF|d7}|d7}|d�d}	x:t||j||�D]$}
||	�||
�|	s^dd|}	q^W|r�|d�dS)N�r	rQrar/rKrR)r1r<rS�_wrap_bytes_reprr))rrrr
rCrDrEr1Zparens�delimrGrrr�
_pprint_bytes's"zPrettyPrinter._pprint_bytescCs>|j}|d�|jt|�||d|d||d�|d�dS)Nz
bytearray(�
r	rR)r1ru�bytes)rrrr
rCrDrEr1rrr�_pprint_bytearray<s
zPrettyPrinter._pprint_bytearraycCs8|jd�|j|j�||d|d||�|jd�dS)Nz
mappingproxy(�
r	rR)r1r0�copy)rrrr
rCrDrErrr�_pprint_mappingproxyEs
z"PrettyPrinter._pprint_mappingproxycCs�|j}||j7}dd|}t|�d}	xrt|�D]f\}
\}}|
|	k}
|j|||�}||�|d�|j|||t|�d|
r�|nd||�|
s2||�q2WdS)Nz,
rKr	z: r)r1r(r<rcr;r0)rrOrr
rCrDrEr1�delimnlZ
last_indexrjrL�ent�lastrGrrrrPMs

z PrettyPrinter._format_dict_itemscCsN|j}||j7}|jdkr,||jdd�dd|}d}	|j|d}
}t|�}yt|�}
Wntk
rvdSXd}x�|�sH|
}yt|�}
Wn(tk
r�d}||8}|
|8}
YnX|j�r|j|||�}t|�d}|
|kr�|}
|	r�|}	|
|k�r|
|8}
||	�d}	||�q~||	�|}	|j	||||�r<|nd||�q~WdS)	Nr	rKz,
raFTrz, )
r1r(r)�iter�next�
StopIterationr.r;r<r0)rrOrr
rCrDrEr1r|rtrrH�itZnext_entr~r}rG�wrrrrZ^sN



zPrettyPrinter._format_itemscCs4|j||j�|j|�\}}}|s&d|_|r0d|_|S)NFT)r4rzr'r:r9)rrrDrErSr6r7rrrr;�szPrettyPrinter._reprcCst||||�S)N)r)rrrD�	maxlevelsrErrrr4�szPrettyPrinter.formatc	Cs�t|�s|jt|��dS|j|j||�}|j}|t|j�d7}|jd|j|d|f�|j||||d||�|jd�dS)Nr	z	%s(%s,
%srKrR)r<r1rSr;�default_factoryrTrrB)	rrrr
rCrDrEZrdfrVrrr�_pprint_default_dict�sz"PrettyPrinter._pprint_default_dictc	Cs�t|�s|jt|��dS|j}|j|jd�|jdkrN|j|jdd�|j�}|j|||t|j�d|d||�|jd�dS)Nz({r	rKrz}))r<r1rSrTrr(�most_commonrP)	rrrr
rCrDrErVrOrrr�_pprint_counter�s
zPrettyPrinter._pprint_counterc
Cs�t|j�s|jt|��dS|j}|j|jd�|t|j�d7}xrt|j�D]d\}}	|t|j�dkr�|j|	|||d||�|jd�qP|j|	||d||�|jdd|�qPWdS)NrQr	rRz,
rK)r<�mapsr1rSrTrrcr0)
rrrr
rCrDrErVrj�mrrr�_pprint_chain_map�s
zPrettyPrinter._pprint_chain_mapc	Cs�t|�s|jt|��dS|j}|j|jd�|t|j�d7}|jd�|jdkrz|j||||d||�|jd�n:|j|||d||�|j|j||�}|jdd||f�dS)NrQr	rXrz])z],
%smaxlen=%s)rK)r<r1rSrTr�maxlenrZr;)	rrrr
rCrDrErVZrmlrrr�
_pprint_deque�s

zPrettyPrinter._pprint_dequecCs|j|j|||||d�dS)Nr	)r0�data)rrrr
rCrDrErrr�_pprint_user_dict�szPrettyPrinter._pprint_user_dictcCs|j|j|||||d�dS)Nr	)r0r�)rrrr
rCrDrErrr�_pprint_user_list�szPrettyPrinter._pprint_user_listcCs|j|j|||||d�dS)Nr	)r0r�)rrrr
rCrDrErrr�_pprint_user_string�sz!PrettyPrinter._pprint_user_string)r	r
NN)2rr r!rrrrrr0r=rBrAr?rW�_collections�OrderedDictr[rUr]�tupler`r^�	frozensetrqrrurwrx�	bytearrayr{�_types�MappingProxyTyperPrZr;r4r��defaultdictr��Counterr��ChainMapr��dequer��UserDictr��UserListr��
UserStringrrrrrbsZ&




1


)	cCs�t|�}|tkrt|�ddfSt|dd�}t|t�o<|tjk�r8|sHdSt|�}|rj||krjdd||kfS||kr�t|�ddfSd||<d}d}g}	|	j	}
|d7}t
}t|j�t
d�}xf|D]^\}
}||
|||�\}}}|||||�\}}}|
d||f�|�o
|�o
|}|�s|r�d}q�W||=d	d
j|	�||fSt|t��rP|tjk�sht|t��rd|tjk�rdt|t��r�|�s~dSd}n"t|�dk�r�d
}n|�s�dSd}t|�}|�r�||k�r�|dd||kfS||k�r�t|�ddfSd||<d}d}g}	|	j	}
|d7}x>|D]6}t
||||�\}}}|
|�|�s:d}|�rd}�qW||=|d
j|	�||fSt|�}||�o~|jd�dfS)NTFr?�{}z{...}r	)rLz%s: %sz{%s}z, �[]z[%s]z(%s,)�()z(%s)z...�<)r�TF)r�TF)r�TF)r�_builtin_scalarsrS�getattr�
issubclassrAr?rr8rdrrNrOr$�joinrUr�r<�
startswith)rrDr�rEr_�rrFr6r7Z
componentsrdrrO�k�vZkreprZ	kreadableZkrecurZvreprZ	vreadableZvrecurr4�oZoreprZ	oreadableZorecurrGrrrr�s|



rcCsdt|�jt|�fS)Nz<Recursion on %s with id=%s>)rrr)rrrrr81sr8cCs�ddl}|dkr,dd
ddgddd	�fgd
}t�}|j�}t|idd�|j�}|j|�|j�}td||�td||�dS)Nr�stringr	r�rr��)��i��z_safe_repr:zpformat:)r	r)�timerrr�print)rr�rIZt1Zt2Zt3rrr�
_perfcheck6s
r�ccs�d}t|�dd}xhtdt|�d�D]T}|||d�}||}||krR||8}tt|��|krv|rpt|�V|}q&|}q&W|r�t|�VdS)N�rrr)r<�rangerS)rrrCrmr~rjrorprrrrsCs
rs�__main__)Nr	r
N)r	r
N)N)"�collectionsr�re�sysr+�typesr��iorr2�__all__rrrrrrr$rrr�rrwr�r%�float�complexr-rr�r8r�rsrrrrr�<module>%s4
D



Hacked By AnonymousFox1.0, Coded By AnonymousFox