관리-도구
편집 파일: fix_throw.cpython-35.opt-2.pyc
���]. � @ 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�ArgList�Attr�is_tuplec @ s( e Z d Z d Z d Z d d � Z d S)�FixThrowTz� power< any trailer< '.' 'throw' > trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' > > | power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > > c C sG | j } | d j � } | j t j k r? | j | d � d S| j d � } | d k r^ d S| j � } t | � r� d d � | j d d � D� } n d | _ | g } | d } d | k r-| d j � } d | _ t | | � } t | t d � � t | g � g } | j t j | j | � � n | j t | | � � d S)N�excz+Python 3 does not support string exceptions�valc S s g | ] } | j � � q S� )�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�prefixr r r r �replacer ZNodeZpower)�selfZnode�resultsr r r r Z throw_argsr �eZwith_tbr r r � transform s* # %zFixThrow.transformN)�__name__� __module__�__qualname__Z BM_compatibleZPATTERNr"