3 \~ @sRdZddlmZddlmZddlmZddlmZmZm Z Gdddej Z dS) zIFixer for apply(). This converts apply(func, v, k) into (func)(*v, **k).)pytree)token) fixer_base)CallComma parenthesizec@seZdZdZdZddZdS)FixApplyTa. power< 'apply' trailer< '(' arglist< (not argument ')' > > c CsF|j}|st|d}|d}|jd}|r`|j|jjkr>dS|j|jjkr`|jdjdkr`dS|r|j|jjkr|jdjdkrdS|j}|j }|jt j |j fkr|j|j ks|jd jt jkrt|}d|_|j }d|_|dk r|j }d|_tjt jd|g}|dk r8|jttjt jd|gd |d _t|||d S) Nfuncargskwdsz**r* )prefixr)symsAssertionErrorgettypeZ star_exprZargumentZchildrenvaluerZclonerNAMEZatomZpower DOUBLESTARrrZLeafSTARextendrr) selfZnoderesultsrr r r rZ l_newargsr!/usr/lib64/python3.6/fix_apply.py transformsB     zFixApply.transformN)__name__ __module__ __qualname__Z BM_compatibleZPATTERNrrrrrrsrN) __doc__r rZpgen2rrZ fixer_utilrrrZBaseFixrrrrrs