AlkantarClanX12

Your IP : 3.144.48.72


Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/pprint.cpython-37.opt-2.pyc

B

YI~d�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�}|�|�dS)N)�stream�indent�width�depthr)rr)�objectrr
rrrZprinter�r�+/opt/alt/python37/lib64/python3.7/pprint.pyr/scCst||||d��|�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&|�||jddid�|j�d�dS)Nr�
)�_formatr*�write)rrrrrr�szPrettyPrinter.pprintcCs"t�}|�||ddid�|��S)Nr)�	_StringIOr0�getvalue)rrZsiorrrr�szPrettyPrinter.pformatcCs|�|idd�dS)Nrr)�format)rrrrrr�szPrettyPrinter.isrecursivecCs |�|idd�\}}}|o|S)Nr)r4)rr�s�readable�	recursiverrrr�szPrettyPrinter.isreadablec	Cs�t|�}||kr.|�t|��d|_d|_dS|�|||�}|j||}	t|�|	kr�|j�	t
|�jd�}
|
dk	r�d||<|
|||||||d�||=dSt|t
�r�d||<|�||||||d�||=dS|�|�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|��td�}	|�|	|||d||�|d�dS)N�{r	� )�key�})r1r(r<�sorted�itemsr$�_format_dict_items)
rrrr
rCrDrEr1�lengthrOrrrrB�s
zPrettyPrinter._pprint_dictcCslt|�s|�t|��dS|j}|�|jd�|�t|���||t|j�d|d||�|�d�dS)N�(r	�))r<r1�repr�	__class__rr0�listrO)rrrr
rCrDrE�clsrrr�_pprint_ordered_dict�sz"PrettyPrinter._pprint_ordered_dictcCs0|�d�|�||||d||�|�d�dS)N�[r	�])r1�
_format_items)rrrr
rCrDrErrr�_pprint_list�s
zPrettyPrinter._pprint_listcCsH|�d�t|�dkrdnd}|�||||t|�||�|�|�dS)NrRr	z,)rS)r1r<r[)rrrr
rCrDrE�endcharrrr�
_pprint_tuple�s

zPrettyPrinter._pprint_tuplec	Cs�t|�s|�t|��dS|j}|tkr8|�d�d}n&|�|jd�d}|t|j�d7}t|td�}|�||||t|�||�|�|�dS)NrJrMz({z})r	)rL)	r<r1rTrU�setrrNrr[)	rrrr
rCrDrE�typr]rrr�_pprint_set�s
zPrettyPrinter._pprint_setcCs�|j}t|�s|t|��dSg}|�d�}	|dkrD|d7}|d7}|j|}
}x�t|	�D]�\}}
t|
�}|t|	�dkr�|
|8}
t|�|
kr�|�|�q\t�d|
�}|�	�|}d}xtt|�D]h\}}||}|t|�dkr�|t|	�dkr�||8}tt|��|k�r&|�r |�t|��|}q�|}q�W|r\|�t|��q\Wt|�dk�r^||�dS|dk�rp|d�x8t|�D],\}}|dk�r�|dd|�||��qzW|dk�r�|d	�dS)
NTr	z\S*\s*�rRrr/rKrS)
r1r<rT�
splitlinesr)�	enumerate�append�re�findall�pop)rrrr
rCrDrEr1Zchunks�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	rRrbr/rKrS)r1r<rT�_wrap_bytes_reprr))rrrr
rCrDrEr1Zparens�delimrGrrr�
_pprint_bytes's"zPrettyPrinter._pprint_bytesc	Cs>|j}|d�|�t|�||d|d||d�|d�dS)Nz
bytearray(�
r	rS)r1ru�bytes)rrrr
rCrDrEr1rrr�_pprint_bytearray<s
zPrettyPrinter._pprint_bytearraycCs8|�d�|�|��||d|d||�|�d�dS)Nz
mappingproxy(�
r	rS)r1r0�copy)rrrr
rCrDrErrr�_pprint_mappingproxyEs
z"PrettyPrinter._pprint_mappingproxyc	Cs�|j}||j7}dd|}t|�d}	xrt|�D]f\}
\}}|
|	k}
|�|||�}||�|d�|�|||t|�d|
r�|nd||�|
s2||�q2WdS)Nz,
rKr	z: r)r1r(r<rdr;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|�|||�}t|�d}|
|kr�|}
|	r�|}	|
|k�r|
|8}
||	�d}	||�q~||	�|}	|�	||||�r<|nd||�q~WdS)	Nr	rKz,
rbFTrz, )
r1r(r)�iter�next�
StopIterationr.r;r<r0)rrOrr
rCrDrEr1r|rtrrH�itZnext_entr~r}rG�wrrrr[^sN



zPrettyPrinter._format_itemscCs4|�||��|j|�\}}}|s&d|_|r0d|_|S)NFT)r4rzr'r:r9)rrrDrErTr6r7rrrr;�szPrettyPrinter._reprcCst||||�S)N)r)rrrD�	maxlevelsrErrrr4�szPrettyPrinter.formatc	Cs�t|�s|�t|��dS|�|j||�}|j}|t|j�d7}|�d|j|d|f�|�||||d||�|�d�dS)Nr	z	%s(%s,
%srKrS)r<r1rTr;�default_factoryrUrrB)	rrrr
rCrDrEZrdfrWrrr�_pprint_default_dict�sz"PrettyPrinter._pprint_default_dictc	Cs�t|�s|�t|��dS|j}|�|jd�|jdkrN|�|jdd�|��}|�|||t|j�d|d||�|�d�dS)Nz({r	rKrz}))r<r1rTrUrr(�most_commonrP)	rrrr
rCrDrErWrOrrr�_pprint_counter�s
zPrettyPrinter._pprint_counterc
	Cs�t|j�s|�t|��dS|j}|�|jd�|t|j�d7}xrt|j�D]d\}}	|t|j�dkr�|�|	|||d||�|�d�qP|�|	||d||�|�dd|�qPWdS)NrRr	rSz,
rK)r<�mapsr1rTrUrrdr0)
rrrr
rCrDrErWrj�mrrr�_pprint_chain_map�s
zPrettyPrinter._pprint_chain_mapc	Cs�t|�s|�t|��dS|j}|�|jd�|t|j�d7}|�d�|jdkrz|�||||d||�|�d�n:|�|||d||�|�|j||�}|�dd||f�dS)NrRr	rYrz])z],
%smaxlen=%s)rK)r<r1rTrUr�maxlenr[r;)	rrrr
rCrDrErWZrmlrrr�
_pprint_deque�s

zPrettyPrinter._pprint_dequec	Cs|�|j|||||d�dS)Nr	)r0�data)rrrr
rCrDrErrr�_pprint_user_dict�szPrettyPrinter._pprint_user_dictc	Cs|�|j|||||d�dS)Nr	)r0r�)rrrr
rCrDrErrr�_pprint_user_list�szPrettyPrinter._pprint_user_listc	Cs|�|j|||||d�dS)Nr	)r0r�)rrrr
rCrDrErrr�_pprint_user_string�sz!PrettyPrinter._pprint_user_string)r	r
NN)2rr r!rrrrrr0r=rBrAr?rX�_collections�OrderedDictr\rVr^�tuplerar_�	frozensetrqrrurwrx�	bytearrayr{�_types�MappingProxyTyperPr[r;r4r��defaultdictr��Counterr��ChainMapr��dequer��UserDictr��UserListr��
UserStringrrrrrbsZ&




1


)	cCs�t|�}|tkrt|�ddfSt|dd�}t|t��r:|tjk�r:|sJdSt|�}|rl||krldd||kfS||kr�t|�ddfSd||<d}d}g}	|	j	}
|d7}t
}t|��t
d�}xf|D]^\}
}||
|||�\}}}|||||�\}}}|
d||f�|�o|�o|}|�s|r�d}q�W||=d	d
�|	�||fSt|t��rR|tjk�sjt|t��rf|tjk�rft|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
�|	�||fSt|�}||�o�|�d�dfS)NTFr?)z{}TFz{...}r	)rLz%s: %sz{%s}z, )z[]TFz[%s]z(%s,))z()TFz(%s)z...�<)r�_builtin_scalarsrT�getattr�
issubclassrAr?rr8rerrNrOr$�joinrVr�r<�
startswith)rrDr�rEr`�rrFr6r7Z
componentsrerrO�k�vZkreprZ	kreadableZkrecurZvreprZ	vreadableZvrecurr4�oZoreprZ	oreadableZorecurrGrrrr�s|



rcCsdt|�jt|�fS)Nz<Recursion on %s with id=%s>)rrr)rrrrr81sr8cCs�ddl}|dkr,ddddgddd�fgd	}t�}|��}t|idd�|��}|�|�|��}td
||�td||�dS)Nr�string)r	r�rr��)��i��z_safe_repr:zpformat:)�timerZperf_counterrr�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<�rangerT)rrrCrmr~rjrorprrrrsCs
rs�__main__)Nr	r
N)r	r
N)N)"�collectionsr�rf�sysr+�typesr��iorr2�__all__rrrrrrr$rrr�rrwr�r%�float�complexr-rr�r8r�rsrrrrr�<module>%s4
D