관리-도구
편집 파일: fix_raise.cpython-35.opt-2.pyc
���]n � @ su d d l m Z d d l m Z d d l m Z d d l m Z m Z m Z m Z m Z Gd d � d e j � Z d S)� )�pytree)�token)� fixer_base)�Name�Call�Attr�ArgList�is_tuplec @ s( e Z d Z d Z d Z d d � Z d S)�FixRaiseTzB raise_stmt< 'raise' exc=any [',' val=any [',' tb=any]] > c C s� | j } | d j � } | j t j k rE d } | j | | � d St | � r� x* t | � r} | j d j d j � } qT Wd | _ d | k r� t j | j t d � | g � } | j | _ | S| d j � } t | � rd d � | j d d � D� } n d | _ | g } d | k r�| d j � } d | _ | } | j t j k sa| j d k rpt | | � } t | t d � � t | g � g } t j | j t d � g | � } | j | _ | St j | j t d � t | | � g d | j �Sd S)N�excz+Python 3 does not support string exceptions� � � �val�raisec S s g | ] } | j � � q S� )�clone)�.0�cr r �./opt/alt/python35/lib64/python3.5/fix_raise.py� <listcomp>D s z&FixRaise.transform.<locals>.<listcomp>� �tb�None�with_traceback�prefix���)�symsr �typer �STRINGZcannot_convertr Zchildrenr r ZNodeZ raise_stmtr �NAME�valuer r r Zsimple_stmt)�selfZnode�resultsr r �msg�newr �argsr �eZwith_tbr r r � transform&