Your IP : 3.15.214.244
3
\� � @ s� d Z dddgZddlZddlmZ yddlmZ W n ek
rR ddlmZ Y nX d
d d�Z G d
d� d�Z
dd� Ze
� Zej
Z
dS )zGRedo the builtin repr() (representation) but with limits on most sizes.�Repr�repr�recursive_repr� N)�islice)� get_ident�...c s � fdd�}|S )zGDecorator to make a repr function return fillvalue for a recursive callc sX t � � �� �fdd�}t�d�|_t�d�|_t�d�|_t�d�|_t�di �|_|S )Nc sB t | �t� f}|�kr� S �j|� z�| �}W d �j|� X |S )N)�idr �add�discard)�self�key�result)� fillvalue�repr_running�
user_function� �/usr/lib64/python3.6/reprlib.py�wrapper s
z<recursive_repr.<locals>.decorating_function.<locals>.wrapper�
__module__�__doc__�__name__�__qualname__�__annotations__)�set�getattrr r r r r )r r )r )r r r �decorating_function s z+recursive_repr.<locals>.decorating_functionr )r r r )r r r s c @ s~ e Zd Zdd� Zdd� Zdd� Zddd �Zd
d� Zdd
� Zdd� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� ZdS ) r c C sF d| _ d| _d| _d| _d| _d| _d| _d| _d| _d| _ d| _
d S )N� � � � �( )�maxlevel�maxtuple�maxlist�maxarray�maxdict�maxset�maxfrozenset�maxdeque� maxstring�maxlong�maxother)r r r r �__init__) s z
Repr.__init__c C s | j || j�S )N)�repr1r! )r �xr r r r 6 s z Repr.reprc C sV t |�j}d|kr$|j� }dj|�}t| d| �rFt| d| �||�S | j||�S d S )N� �_�repr_)�typer �split�join�hasattrr �
repr_instance)r r. �level�typename�partsr r r r- 9 s
z
Repr.repr1� c
s� t |�}|dkr|rd}nX|d � | j�� �fdd�t||�D �} ||krT| jd� dj| �}|dkrr|rr|| }d|||f S )Nr z...� c s g | ]}�|� ��qS r r )�.0�elem)�newlevelr- r r �
<listcomp>J s z'Repr._repr_iterable.<locals>.<listcomp>z, z%s%s%s)�lenr- r �appendr4 )
r r. r7 �left�right�maxiter�trail�n�s�piecesr )r>