\d.pdZddlmZddlmZddlmZddlmZmZm Z m Z m Z Gddej Z dS) zFixer for generator.throw(E, V, T). g.throw(E) -> g.throw(E) g.throw(E, V) -> g.throw(E(V)) g.throw(E, V, T) -> g.throw(E(V).with_traceback(T)) g.throw("foo"[, V[, T]]) will warn about string exceptions.)pytree)token) fixer_base)NameCallArgListAttris_tupleceZdZdZdZdZdS)FixThrowTz power< any trailer< '.' 'throw' > trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' > > | power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > > c|j}|d}|jtjur||ddS|d}|dS|}t|rd|jddD}n d|_ |g}|d}d |vr|d }d|_ t||} t| td t|ggz} |tj|j| dS|t||dS) Nexcz+Python 3 does not support string exceptionsvalc6g|]}|S)clone).0cs (..\python\lib\lib2to3\fixes\fix_throw.py z&FixThrow.transform..)s :::!AGGII:::argstbwith_traceback)symsrtyperSTRINGcannot_convertgetr childrenprefixrr rrreplacerNodepower) selfnoderesultsrrrr throw_argsrewith_tbs r transformzFixThrow.transforms[yen""$$ 8u| # #   &S T T T Fkk%   ; Fiikk C== ::s|AbD'9:::DDCJ5DV_ 7??$$&&BBIS$A1d#34455"GG   v{4:w?? @ @ @ @ @   tC / / / / /rN)__name__ __module__ __qualname__ BM_compatiblePATTERNr.rrrr r s/MG00000rr N)__doc__rrpgen2rr fixer_utilrrrr r BaseFixr rrrr8s??<<<<<<<<<<<<<<(0(0(0(0(0z!(0(0(0(0(0r