AlkantarClanX12

Your IP : 3.144.8.68


Current Path : /opt/alt/python35/lib64/python3.5/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/lib2to3/fixes/__pycache__/fix_throw.cpython-35.opt-2.pyc



���].�@suddlmZddlmZddlmZddlmZmZmZm	Z	m
Z
Gdd�dej�ZdS)�)�pytree)�token)�
fixer_base)�Name�Call�ArgList�Attr�is_tuplec@s(eZdZdZdZdd�ZdS)�FixThrowTz�
    power< any trailer< '.' 'throw' >
           trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' >
    >
    |
    power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > >
    cCsG|j}|dj�}|jtjkr?|j|d�dS|jd�}|dkr^dS|j�}t|�r�dd�|jdd�D�}nd|_	|g}|d}d	|kr-|d	j�}d|_	t
||�}	t|	td
��t
|g�g}
|jtj|j|
��n|jt
||��dS)N�excz+Python 3 does not support string exceptions�valcSsg|]}|j��qS�)�clone)�.0�cr
r
�./opt/alt/python35/lib64/python3.5/fix_throw.py�
<listcomp>)s	z&FixThrow.transform.<locals>.<listcomp>���args�tb�with_traceback���)�symsr�typer�STRINGZcannot_convert�getr	Zchildren�prefixrrrr�replacerZNodeZpower)�selfZnode�resultsrrrrZ
throw_argsr�eZwith_tbr
r
r�	transforms*	#		
	%zFixThrow.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr"r
r
r
rr
sr
N)
rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
r
r
r
r�<module>s(