Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib/python3.7/site-packages/py/_code/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/py/_code/__pycache__/assertion.cpython-37.pyc

B

���]5
�@s�ddlZddlZejjjZdZdd�ZGdd�de�ZejdkrLde_	dZ
ndd	lmZ
ejd
ksnej
�d�r|dd	lmZne
ZdS)�Nc	Cs�|pd�d�}|dg}xR|dd�D]B}|�d�sH|�d�sH|�d�rT|�|�q&|d	d
|7<q&W|dd�}dg}dg}x�|dd�D]�}|�d��r|d	r�d}nd}|�t|��|d	d7<|�d�|�d
dt|�d||dd��q�|�d��rR|�d��s$t�|��|��||d	|dd�7<q�|�d��sbt�|�dt|�|dd��q�Wt|�dk�s�t�d�|�S)a�This formats an explanation

    Normally all embedded newlines are escaped, however there are
    three exceptions: 
{, 
} and 
~.  The first two are intended
    cover nested explanations, see function and attribute explanations
    for examples (.visit_Call(), visit_Attribute()).  The last one is
    for when one explanation needs to span multiple lines, e.g. when
    displaying diffs.
    ��
r�N�{�}�~���z\nzand   zwhere z +z  )�split�
startswith�append�len�AssertionError�pop�join)	ZexplanationZ	raw_lines�lines�l�result�stackZstackcnt�line�s�r�C/opt/alt/python37/lib/python3.7/site-packages/py/_code/assertion.py�_format_explanations6


,"rc@seZdZdd�ZdS)r
cGs tj|f|��|rjyt|d�|_Wn@tjjk
r@�Yn(d|djt|d�f|_YnXn�tj	�
t�d��}yR|j	j
}|dk	r�y|j|jdd�}Wntk
r�d}YnXt|�����}Wntjjk
r�d}YnX|�rt||dd�|_nd|_|j�s|jf|_dS)Nrz<[broken __repr__] %s at %0xd>rT)Z	assertion)Zshould_failz!<could not determine information>)�BuiltinAssertionError�__init__�str�msg�py�builtinZ_sysex�	__class__�id�codeZFrame�sys�	_getframeZ
fullsourceZgetstatement�lineno�
IndexErrorZdeindent�strip�error�ENOENT�reinterpret�args)�selfr*�f�sourcerrrr5s2"

zAssertionError.__init__N)�__name__�
__module__�__qualname__rrrrrr
4sr
)�r�builtinsz*old reinterpretation not available for py3)�	interpret)���java)r"rrr2r
rZ_reprcomparer�version_infor/Zreinterpret_oldZpy._code._assertionoldr3�platformr
Zpy._code._assertionnewr)rrrr�<module>s
,!