ok

Mini Shell

Direktori : /opt/alt/python35/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/__pycache__/ast.cpython-35.opt-2.pyc



���]�.�@s�ddlTdddd�Zdd�Zdd	d
d�Zdd
�Zdd�Zddd�Zdd�Zdd�Zddd�Z	dd�Z
Gdd�de�ZGdd�de�Z
dS) �)�*z	<unknown>�execcCst|||t�S)N)�compileZ
PyCF_ONLY_AST)�source�filename�mode�r�(/opt/alt/python35/lib64/python3.5/ast.py�parsesr
csUt|t�r!t|dd�}t|t�r9|j}�fdd���|�S)Nr�evalcst|ttf�r|jSt|t�r2|jSt|t�rWtt�|j	��St|t
�r|tt�|j	��St|t�r�t
t�|j	��St|t�r�t�fdd�t|j|j�D��St|t�r�|jSt|t�rbt|jttf�rbt|jtttf�rb�|j�}t|jt�rZ|
S|Sn�t|t�r�t|jttf�r�t|jtttf�r�t|jtttf�r��|j�}�|j�}t|jt�r�||S||Stdt |���dS)Nc3s-|]#\}}�|��|�fVqdS)Nr)�.0�k�v)�_convertrr	�	<genexpr>=sz1literal_eval.<locals>._convert.<locals>.<genexpr>zmalformed node or string: )!�
isinstance�StrZBytes�sZNum�nZTuple�tuple�mapZeltsZList�list�Set�setZDict�dict�zip�keys�valuesZNameConstant�valueZUnaryOp�opZUAddZUSub�operandZBinOpZAddZSub�right�left�
ValueError�repr)�noder r"r!)rrr	r1s@zliteral_eval.<locals>._convert)r�strr
Z
Expression�body)Znode_or_stringr)rr	�literal_eval&s	#r(TFcsG���fdd��t|t�s=td|jj���|�S)Ncs	t�t�r��fdd�t��D�}d�jjdj�rYdd�|D�ndd�|D��f}�r��jr�||r�dp�d7}|dj��fd	d��jD��7}|d
St�t�r�ddj�fdd��D��St��S)
Ncs(g|]\}}|�|�f�qSrr)r�a�b)�_formatrr	�
<listcomp>bs	z)dump.<locals>._format.<locals>.<listcomp>z%s(%sz, css|]}d|VqdS)z%s=%sNr)r�fieldrrr	rdsz(dump.<locals>._format.<locals>.<genexpr>css|]\}}|VqdS)Nr)rr)r*rrr	rfs� c3s.|]$}d|�t�|��fVqdS)z%s=%sN)�getattr)rr))r+r%rr	rjs�)z[%s]c3s|]}�|�VqdS)Nr)r�x)r+rr	rns)	r�AST�iter_fields�	__class__�__name__�join�_attributesrr$)r%Zfields�rv)r+�annotate_fields�include_attributes)r%r	r+`s$zdump.<locals>._formatzexpected AST, got %r)rr2�	TypeErrorr4r5)r%r9r:r)r+r9r:r	�dumpWs	r<cCs[xTdD]L}||jkr||jkrt||�rt||t||��qW|S)N�lineno�
col_offset)r=r>)r7�hasattr�setattrr/)�new_nodeZold_node�attrrrr	�
copy_locationus

rCcs&�fdd���|dd�|S)Ncs�d|jkr3t|d�s*||_n	|j}d|jkrft|d�s]||_n	|j}x$t|�D]}�|||�qsWdS)Nr=r>)r7r?r=r>�iter_child_nodes)r%r=r>�child)�_fixrr	rF�s		z#fix_missing_locations.<locals>._fix�rr)r%r)rFr	�fix_missing_locations�s
rHrGcCsCx<t|�D].}d|jkr
t|dd�||_q
W|S)Nr=r)�walkr7r/r=)r%rrErrr	�increment_lineno�srJccsEx>|jD]3}y|t||�fVWq
tk
r<Yq
Xq
WdS)N)�_fieldsr/�AttributeError)r%r-rrr	r3�s

r3ccslxet|�D]W\}}t|t�r0|Vq
t|t�r
x"|D]}t|t�rF|VqFWq
WdS)N)r3rr2r)r%�namer-�itemrrr	rD�s
rDcCs�t|ttttf�s1td|jj��|jr�t|jdt	�r�t|jdj
t�r�|r�ddl}|j
|jdj
j�S|jdj
jSdS)Nz%r can't have docstringsr)rZAsyncFunctionDefZFunctionDefZClassDefZModuler;r4r5r'ZExprrr�inspectZcleandocr)r%ZcleanrOrrr	�
get_docstring�srPccsTddlm}||g�}x.|rO|j�}|jt|��|Vq"WdS)Nr)�deque)�collectionsrQ�popleft�extendrD)r%rQZtodorrr	rI�s	rIc@s(eZdZdd�Zdd�ZdS)�NodeVisitorcCs/d|jj}t|||j�}||�S)NZvisit_)r4r5r/�
generic_visit)�selfr%�methodZvisitorrrr	�visit�szNodeVisitor.visitcCs|xut|�D]g\}}t|t�rXxI|D]"}t|t�r/|j|�q/Wq
t|t�r
|j|�q
WdS)N)r3rrr2rY)rWr%r-rrNrrr	rV�s
zNodeVisitor.generic_visitN)r5�
__module__�__qualname__rYrVrrrr	rU�srUc@seZdZdd�ZdS)�NodeTransformercCsx�t|�D]�\}}t|t�r�g}xj|D]b}t|t�r�|j|�}|dkrkq5nt|t�s�|j|�q5|j|�q5W||dd�<q
t|t�r
|j|�}|dkr�t||�q
t|||�q
W|S)N)	r3rrr2rYrT�append�delattrr@)rWr%r-Z	old_valueZ
new_valuesrrArrr	rV&s&

zNodeTransformer.generic_visitN)r5rZr[rVrrrr	r\s$r\N)Z_astr
r(r<rCrHrJr3rDrPrI�objectrUr\rrrr	�<module>s
1%

Zerion Mini Shell 1.0