관리-도구
편집 파일: fix_apply.cpython-35.opt-1.pyc
��Yf~ � @ so d Z d d l m Z d d l m Z d d l m Z d d l m Z m Z m Z Gd d � d e j � Z d S) zIFixer for apply(). This converts apply(func, v, k) into (func)(*v, **k).� )�pytree)�token)� fixer_base)�Call�Comma�parenthesizec @ s( e Z d Z d Z d Z d d � Z d S)�FixApplyTa. power< 'apply' trailer< '(' arglist< (not argument<NAME '=' any>) func=any ',' (not argument<NAME '=' any>) args=any [',' (not argument<NAME '=' any>) kwds=any] [','] > ')' > > c C s� | j } | d } | d } | j d � } | rz | j | j j k rK d S| j | j j k rz | j d j d k rz d S| r� | j | j j k r� | j d j d k r� d S| j } | j � } | j t j | j f k r| j | j k s | j d j t j k rt | � } d | _ | j � } d | _ | d k rU| j � } d | _ t j t j d � | g } | d k r�| j t � t j t j d � | g � d | d _ t | | d | �S) N�func�args�kwds� z**r � �*� �prefix���r )�syms�get�typeZ star_exprZargumentZchildren�valuer Zcloner �NAMEZatomZpower� DOUBLESTARr r ZLeaf�STAR�extendr r ) �selfZnodeZresultsr r r r r Z l_newargs� r �</opt/alt/python35/lib64/python3.5/lib2to3/fixes/fix_apply.py� transform s@ zFixApply.transformN)�__name__� __module__�__qualname__Z BM_compatibleZPATTERNr r r r r r s r N)�__doc__r r Zpgen2r r Z fixer_utilr r r ZBaseFixr r r r r �<module> s