Hacked By AnonymousFox

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

B

YI~d*2�@s�ddlTd dd�Zdd�Zd!d
d�Zdd
�Zdd�Zd"dd�Zdd�Zdd�Zd#dd�Z	dd�Z
Gdd�de�ZGdd�de�Z
dS)$�)�*�	<unknown>�execcCst|||t�S)N)�compileZ
PyCF_ONLY_AST)�source�filename�mode�r	�(/opt/alt/python37/lib64/python3.7/ast.py�parsesrcsRt|t�rt|dd�}t|t�r&|j}dd���fdd�����fdd���|�S)	N�eval)rcSsHt|t�r$t|jtttf�r4|jSnt|t�r4|jStdt	|���dS)Nzmalformed node or string: )
�
isinstance�Constant�value�int�float�complex�Num�n�
ValueError�repr)�noder	r	r
�_convert_num1s

z"literal_eval.<locals>._convert_numcsDt|t�r<t|jttf�r<�|j�}t|jt�r6|
S|S�|�S)N)r
ZUnaryOp�opZUAddZUSub�operand)rr)rr	r
�_convert_signed_num8s
z)literal_eval.<locals>._convert_signed_numcs.t|t�r|jSt|ttf�r$|jSt|t�r4|jSt|t�rNt	t
�|j��St|t�rht
t
�|j��St|t�r�tt
�|j��St|t�r�ttt
�|j�t
�|j���St|t�r�|jSt|t��r&t|jttf��r&�|j�}�|j�}t|ttf��r&t|t��r&t|jt��r||S||S�|�S)N)r
rr�StrZBytes�srrZTuple�tuple�mapZeltsZList�list�Set�setZDict�dict�zip�keys�valuesZNameConstantZBinOprZAddZSub�left�rightrrr)rr'r()�_convertrrr	r
r)@s2








zliteral_eval.<locals>._convert)r
�strrZ
Expression�body)Znode_or_stringr	)r)rrr
�literal_eval&s

r,TFcs2���fdd��t|t�s*td|jj���|�S)Nc	s
t|t�r�g}�}x`|jD]V}yt||�}Wntk
rDd}YqX|rb|�d|�|�f�q|��|��qW�r�|jr�xD|jD]:}y |�d|�t||��f�Wq�tk
r�Yq�Xq�Wd|jjd�	|�fSt|t
��rdd�	�fdd�|D��St|�S)NTz%s=%sz%s(%s)z, z[%s]c3s|]}�|�VqdS)Nr	)�.0�x)�_formatr	r
�	<genexpr>~sz(dump.<locals>._format.<locals>.<genexpr>)r
�AST�_fields�getattr�AttributeError�append�_attributes�	__class__�__name__�joinr r)r�args�keywords�fieldr�a)r/�annotate_fields�include_attributesr	r
r/hs*


 
zdump.<locals>._formatzexpected AST, got %r)r
r1�	TypeErrorr7r8)rr>r?r	)r/r>r?r
�dump^s

rAcCsBx<dD]4}||jkr||jkrt||�rt||t||��qW|S)N)�lineno�
col_offset)r6�hasattr�setattrr3)�new_nodeZold_node�attrr	r	r
�
copy_location�s


rHcs�fdd���|dd�|S)Ncsfd|jkr"t|d�s||_n|j}d|jkrDt|d�s>||_n|j}xt|�D]}�|||�qNWdS)NrBrC)r6rDrBrC�iter_child_nodes)rrBrC�child)�_fixr	r
rK�s



z#fix_missing_locations.<locals>._fix�rr	)rr	)rKr
�fix_missing_locations�s
rMrLcCs2x,t|�D] }d|jkr
t|dd�||_q
W|S)NrBr)�walkr6r3rB)rrrJr	r	r
�increment_lineno�s
rOc	cs>x8|jD].}y|t||�fVWqtk
r4YqXqWdS)N)r2r3r4)rr<r	r	r
�iter_fields�s
rPccsTxNt|�D]B\}}t|t�r$|Vq
t|t�r
x|D]}t|t�r4|Vq4Wq
WdS)N)rPr
r1r )r�namer<�itemr	r	r
rI�s



rIcCs�t|ttttf�s"td|jj��|jr8t|jdt	�s<dS|jdj
}t|t�rZ|j}n"t|t
�rxt|j
t�rx|j
}ndS|r�ddl}|�|�}|S)Nz%r can't have docstringsr)r
ZAsyncFunctionDefZFunctionDefZClassDefZModuler@r7r8r+ZExprrrrrr*�inspectZcleandoc)rZclean�textrSr	r	r
�
get_docstring�s	

rUccs@ddlm}||g�}x$|r:|��}|�t|��|VqWdS)Nr)�deque)�collectionsrV�popleft�extendrI)rrVZtodor	r	r
rN�s
rNc@seZdZdd�Zdd�ZdS)�NodeVisitorcCs"d|jj}t|||j�}||�S)NZvisit_)r7r8r3�
generic_visit)�selfr�methodZvisitorr	r	r
�visitszNodeVisitor.visitcCs\xVt|�D]J\}}t|t�r@x6|D]}t|t�r"|�|�q"Wq
t|t�r
|�|�q
WdS)N)rPr
r r1r^)r\rr<rrRr	r	r
r[s



zNodeVisitor.generic_visitN)r8�
__module__�__qualname__r^r[r	r	r	r
rZ�srZc@seZdZdd�ZdS)�NodeTransformercCs�x�t|�D]�\}}t|t�r|g}xL|D]D}t|t�r`|�|�}|dkrJq&nt|t�s`|�|�q&|�|�q&W||dd�<q
t|t�r
|�|�}|dkr�t||�q
t|||�q
W|S)N)	rPr
r r1r^rYr5�delattrrE)r\rr<�	old_valueZ
new_valuesrrFr	r	r
r[@s&







zNodeTransformer.generic_visitN)r8r_r`r[r	r	r	r
ras$raN)rr)TF)rL)T)�_astrr,rArHrMrOrPrIrUrN�objectrZrar	r	r	r
�<module>s
8
'

%

Hacked By AnonymousFox1.0, Coded By AnonymousFox