AlkantarClanX12
Current Path : /lib64/python3.6/lib2to3/fixes/__pycache__/ |
Current File : //lib64/python3.6/lib2to3/fixes/__pycache__/fix_throw.cpython-36.opt-2.pyc |
3 \. � @ sV d dl mZ d dlmZ d dl mZ d dlmZmZmZm Z m Z G dd� dej�ZdS )� )�pytree)�token)� fixer_base)�Name�Call�ArgList�Attr�is_tuplec @ s e Zd ZdZdZdd� ZdS )�FixThrowTz� power< any trailer< '.' 'throw' > trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' > > | power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > > c C s� | j }|d j� }|jtjkr.| j|d� d S |jd�}|d krDd S |j� }t|�rndd� |jdd� D �}nd|_ |g}|d }d |kr�|d j� }d|_ t ||�} t| td ��t |g�g } |jtj|j| �� n|jt ||�� d S )N�excz+Python 3 does not support string exceptions�valc S s g | ]}|j � �qS � )�clone)�.0�cr r �//usr/lib64/python3.6/lib2to3/fixes/fix_throw.py� <listcomp>) s z&FixThrow.transform.<locals>.<listcomp>� � �args�tb�with_traceback���)�symsr �typer �STRINGZcannot_convert�getr Zchildren�prefixr r r r �replacer ZNodeZpower)�selfZnodeZresultsr r r r Z throw_argsr �eZwith_tbr r r � transform s* zFixThrow.transformN)�__name__� __module__�__qualname__Z BM_compatibleZPATTERNr! r r r r r s r N) r r Zpgen2r r Z fixer_utilr r r r r ZBaseFixr r r r r �<module> s