Hacked By AnonymousFox

Current Path : /opt/alt/python39/lib64/python3.9/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/__pycache__/pprint.cpython-39.opt-2.pyc

a

R�f�W�
@s�ddlZddlZddlZddlZddlmZ	gd�Z
d%ddd�d	d
�Zd&ddd�dd�Zdd
�dd�Z
dd�Zdd�Zdd�ZGdd�d�Zdd�ZGdd�d�Zdd�Zeeeeeeeeed�h�Zdd�Zd'd d!�Z d"d#�Z!e"d$kr�e �dS)(�N)�StringIO)�pprint�pformat�
isreadable�isrecursive�saferepr�
PrettyPrinter�pp��PFT��compact�
sort_dictscCs"t||||||d�}|�|�dS)N)�stream�indent�width�depthr
r)rr)�objectrrrrr
rZprinter�r�+/opt/alt/python39/lib64/python3.9/pprint.pyr/s
�rcCst|||||d��|�S)N)rrrr
r)rr)rrrrr
rrrrr7s
��r)rcOst|g|�Rd|i|��dS)Nr)r)rr�args�kwargsrrrr	=sr	cCst|iddd�dS)NrT��
_safe_repr�rrrrrAsrcCst|iddd�dS)NrTr
rrrrrrEsrcCst|iddd�dS)NrT�rrrrrrIsrc@s"eZdZdgZdd�Zdd�ZdS)�	_safe_key�objcCs
||_dS�N)r)�selfrrrr�__init__Ysz_safe_key.__init__cCsVz|j|jkWStyPtt|j��t|j�ftt|j��t|j�fkYS0dSr)r�	TypeError�str�type�id)r�otherrrr�__lt__\s�z_safe_key.__lt__N)�__name__�
__module__�__qualname__�	__slots__r r&rrrrrMs
rcCst|d�t|d�fS)Nrr
)r)�trrr�_safe_tuplecsr,c@s�eZdZd=ddd�dd�Zd	d
�Zdd�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 e e	ej!j<d'd(�Z"d)d*�Z#d+d,�Z$d-d.�Z%d/d0�Z&e&e	ej'j<d1d2�Z(e(e	ej)j<d3d4�Z*e*e	ej+j<d5d6�Z,e,e	ej-j<d7d8�Z.e.e	ej/j<d9d:�Z0e0e	ej1j<d;d<�Z2e2e	ej3j<dS)>rr
rNFTrcCs�t|�}t|�}|dkr td��|dur8|dkr8td��|sDtd��||_||_||_|durf||_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�_sort_dicts)rrrrrr
rrrrr hs 
zPrettyPrinter.__init__cCs&|�||jddid�|j�d�dS)Nr�
)�_formatr2�write�rrrrrr�szPrettyPrinter.pprintcCs"t�}|�||ddid�|��S�Nr)�	_StringIOr9�getvalue)rrZsiorrrr�szPrettyPrinter.pformatcCs|�|idd�dS)Nrr��formatr;rrrr�szPrettyPrinter.isrecursivecCs |�|idd�\}}}|o|Sr<r?)rr�s�readable�	recursiverrrr�szPrettyPrinter.isreadablec	Cs�t|�}||vr.|�t|��d|_d|_dS|�|||�}|j||}	t|�|	kr�|j�	t
|�jd�}
|
dur�d||<|
|||||||d�||=dSt|t
�r�d||<|�||||||d�||=dS|�|�dS)NTFr
)r$r:�
_recursion�
_recursive�	_readable�_reprr1�len�	_dispatch�getr#�__repr__�
isinstance�dict�_pprint_dict)rrrr�	allowance�context�level�objid�rep�	max_width�prrrr9�s.
�zPrettyPrinter._formatc
Csz|j}|d�|jdkr*||jdd�t|�}|rn|jrNt|��td�}	n|��}	|�|	|||d||�|d�dS)N�{r
� ��key�})r:r0rHr7�sorted�itemsr,�_format_dict_items)
rrrrrOrPrQr:Zlengthr\rrrrN�s
�zPrettyPrinter._pprint_dictcCslt|�s|�t|��dS|j}|�|jd�|�t|���||t|j�d|d||�|�d�dS)N�(r
�))rHr:�repr�	__class__r'r9�listr\)rrrrrOrPrQ�clsrrr�_pprint_ordered_dict�s�z"PrettyPrinter._pprint_ordered_dictcCs0|�d�|�||||d||�|�d�dS)N�[r
�])r:�
_format_items�rrrrrOrPrQrrr�_pprint_list�s

�zPrettyPrinter._pprint_listcCsH|�d�t|�dkrdnd}|�||||t|�||�|�|�dS)Nr^r
z,)r_)r:rHrg)rrrrrOrPrQ�endcharrrr�
_pprint_tuple�s
�zPrettyPrinter._pprint_tuplec	Cs�t|�s|�t|��dS|j}|tur8|�d�d}n&|�|jd�d}|t|j�d7}t|td�}|�||||t|�||�|�|�dS)NrVrZ�({�})r
rX)	rHr:r`ra�setr'r[rrg)	rrrrrOrPrQ�typrjrrr�_pprint_set�s
�zPrettyPrinter._pprint_setcCs�|j}t|�s|t|��dSg}|�d�}	|dkrD|d7}|d7}|j|}
}t|	�D]�\}}
t|
�}|t|	�dkr�|
|8}
t|�|
kr�|�|�qZt�d|
�}|�	�|}d}t|�D]h\}}||}|t|�dkr�|t|	�dkr�||8}tt|��|k�r"|�r|�t|��|}q�|}q�|rZ|�t|��qZt|�dk�rV||�dS|dk�rh|d�t|�D],\}}|dk�r�|dd|�||��qp|dk�r�|d	�dS)
NTr
z\S*\s*�r^rr8rWr_)
r:rHr`�
splitlinesr1�	enumerate�append�re�findall�pop)rrrrrOrPrQr:Zchunks�linesZ
max_width1rT�i�linerS�partsZ
max_width2�current�j�part�	candidaterrr�_pprint_strsT
 


zPrettyPrinter._pprint_strcCs�|j}t|�dkr"|t|��dS|dk}|rF|d7}|d7}|d�d}	t||j||�D]$}
||	�||
�|	s\dd|}	q\|r�|d�dS)N�r
r^rqr8rWr_)r:rHr`�_wrap_bytes_reprr1)rrrrrOrPrQr:Zparens�delimrSrrr�
_pprint_bytes3s"zPrettyPrinter._pprint_bytesc	Cs>|j}|d�|�t|�||d|d||d�|d�dS)Nz
bytearray(�
r
r_)r:r��bytes)rrrrrOrPrQr:rrr�_pprint_bytearrayHs�zPrettyPrinter._pprint_bytearraycCs8|�d�|�|��||d|d||�|�d�dS)Nz
mappingproxy(�
r
r_)r:r9�copyrhrrr�_pprint_mappingproxyQs

�z"PrettyPrinter._pprint_mappingproxyc	Cs�t|�tjurd}n|jj}|t|�d7}dd|}|j��}	t|	�d}
|�|d�t	|	�D]^\}\}}
|�|�|�d�||
k}|�
|
||t|�d|r�|nd||�|sd|�|�qd|�d�dS)N�	namespacer
�,
rWr^�=r_)r#�_types�SimpleNamespacerar'rH�__dict__r\r:rsr9)rrrrrOrPrQ�cls_name�delimnlr\�
last_indexryrY�ent�lastrrr�_pprint_simplenamespaceYs&



�z%PrettyPrinter._pprint_simplenamespacec	Cs�|j}||j7}dd|}t|�d}	t|�D]f\}
\}}|
|	k}
|�|||�}||�|d�|�|||t|�d|
r�|nd||�|
s0||�q0dS)Nr�rWr
z: r)r:r0rHrsrGr9)rr\rrrOrPrQr:r�r�ryrYr�r�rSrrrr]ts

�z PrettyPrinter._format_dict_itemscCsH|j}||j7}|jdkr,||jdd�dd|}d}	|j|d}
}t|�}zt|�}
WntyvYdS0d}|�sD|
}zt|�}
Wn&ty�d}||8}|
|8}
Yn0|j�r|�|||�}t|�d}|
|kr�|}
|	r�|}	|
|k�r|
|8}
||	�d}	||�q|||	�|}	|�	||||�r8|nd||�q|dS)	Nr
rWr�rqFTr�, )
r:r0r1�iter�next�
StopIterationr6rGrHr9)rr\rrrOrPrQr:r�r�rrT�itZnext_entr�r�rS�wrrrrg�sP



�zPrettyPrinter._format_itemscCs4|�||��|j|�\}}}|s&d|_|r0d|_|S)NFT)r@r�r/rFrE)rrrPrQr`rBrCrrrrG�s�
zPrettyPrinter._reprcCst|||||j�Sr)rr7)rrrP�	maxlevelsrQrrrr@�szPrettyPrinter.formatc	Cs�t|�s|�t|��dS|�|j||�}|j}|t|j�d7}|�d|j|d|f�|�||||d||�|�d�dS)Nr
z	%s(%s,
%srWr_)rHr:r`rG�default_factoryrar'rN)	rrrrrOrPrQZrdfrcrrr�_pprint_default_dict�sz"PrettyPrinter._pprint_default_dictc	Cs�t|�s|�t|��dS|j}|�|jd�|jdkrN|�|jdd�|��}|�|||t|j�d|d||�|�d�dS)Nrlr
rWrrm)rHr:r`rar'r0�most_commonr])	rrrrrOrPrQrcr\rrr�_pprint_counter�s
�zPrettyPrinter._pprint_counterc
	Cs�t|j�s|�t|��dS|j}|�|jd�|t|j�d7}t|j�D]d\}}	|t|j�dkr�|�|	|||d||�|�d�qN|�|	||d||�|�dd|�qNdS)Nr^r
r_r�rW)rH�mapsr:r`rar'rsr9)
rrrrrOrPrQrcry�mrrr�_pprint_chain_map�s
zPrettyPrinter._pprint_chain_mapc	Cs�t|�s|�t|��dS|j}|�|jd�|t|j�d7}|�d�|jdurz|�||||d||�|�d�n:|�|||d||�|�|j||�}|�dd||f�dS)Nr^r
rerz])z],
%smaxlen=%s)rW)rHr:r`rar'�maxlenrgrG)	rrrrrOrPrQrcZrmlrrr�
_pprint_deque�s"

��zPrettyPrinter._pprint_dequec	Cs|�|j|||||d�dS�Nr
�r9�datarhrrr�_pprint_user_dictszPrettyPrinter._pprint_user_dictc	Cs|�|j|||||d�dSr�r�rhrrr�_pprint_user_listszPrettyPrinter._pprint_user_listc	Cs|�|j|||||d�dSr�r�rhrrr�_pprint_user_string
sz!PrettyPrinter._pprint_user_string)r
rNN)4r'r(r)r rrrrr9rIrNrMrKrd�_collections�OrderedDictrirbrk�tuplerprn�	frozensetr�r"r�r�r��	bytearrayr�r��MappingProxyTyper�r�r]rgrGr@r��defaultdictr��Counterr��ChainMapr��dequer��UserDictr��UserListr��
UserStringrrrrrgs`�+




1


)	rcCs�t|�}|tvrt|�ddfSt|dd�}t|t��rD|tju�rD|sJdSt|�}|rl||krldd||vfS||vr�t|�ddfSd||<d}d}	g}
|
j	}|d7}|r�t
|��td�}n|��}|D]b\}
}t
|
||||�\}}}t
|||||�\}}}|d||f�|�o|�o|}|�s$|r�d}	q�||=d	d
�|
�||	fSt|t��r\|tju�stt|t��rn|tju�rnt|t��r�|�s�dSd}n"t|�dk�r�d
}n|�s�dSd}t|�}|�r�||k�r�|dd||vfS||v�r�t|�ddfSd||<d}d}	g}
|
j	}|d7}|D]8}t
|||||�\}}}||�|�sFd}|�rd}	�q||=|d
�|
�||	fSt|�}||�o�|�d�dfS)NTFrK)z{}TFz{...}r
rXz%s: %sz{%s}r�)z[]TFz[%s]z(%s,))z()TFz(%s)z...�<)r#�_builtin_scalarsr`�getattr�
issubclassrMrKr$rDrtr[r\r,r�joinrbr�rH�
startswith)rrPr�rQrro�rrRrBrCZ
componentsrtr\�k�vZkreprZ	kreadableZkrecurZvreprZ	vreadableZvrecurr@�oZoreprZ	oreadableZorecurrSrrrrs�
��
rcCsdt|�jt|�fS)Nz<Recursion on %s with id=%s>)r#r'r$rrrrrDZs�rDcCs�ddl}|dur,ddddgddd�fgd	}t�}|��}t|iddd
�|��}|�|�|��}td||�td||�dS)
Nr�string)r
r�r���)��i��Tz_safe_repr:zpformat:)�timer�perf_counterrr�print)rr�rU�t1�t2Zt3rrr�
_perfcheck_s
r�ccs�d}t|�dd}tdt|�d�D]T}|||d�}||}||krP||8}tt|��|krt|rnt|�V|}q$|}q$|r�t|�VdS)N�r�r)rH�ranger`)rrrOr|r�ryr~rrrrr�ls
r��__main__)Nr
rN)r
rN)N)#�collectionsr�ru�sysr3�typesr��iorr=�__all__rrr	rrrrr,rrr�r"r�r�r-�float�complexr5r#r�rDr�r�r'rrrr�<module>%s<��-F�



Hacked By AnonymousFox1.0, Coded By AnonymousFox