AlkantarClanX12
Current Path : /opt/alt/python34/lib64/python3.4/lib2to3/fixes/__pycache__/ |
Current File : //opt/alt/python34/lib64/python3.4/lib2to3/fixes/__pycache__/fix_apply.cpython-34.pyo |
� j fm � @ 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 sJ | j } | d } | d } | j d � } | j } | j � } | j t j | j f k r� | j | j k s� | j d j t j k r� t | � } n d | _ | j � } d | _ | d k r� | j � } d | _ n t j t j d � | g } | d k r7| j t � t j t j d � | g � d | d _ n t | | d | �S)N�func�args�kwdsr � �*z**� �prefix���r )�syms�getr Zclone�typer �NAMEZatomZpowerZchildren� DOUBLESTARr r ZLeaf�STAR�extendr r ) �selfZnodeZresultsr r r r r Z l_newargs� r �</opt/alt/python34/lib64/python3.4/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