Viewing File: /opt/alt/python311/lib64/python3.11/lib2to3/fixes/__pycache__/fix_throw.cpython-311.pyc
f. p d Z ddlmZ ddlmZ ddlmZ ddlmZmZm Z m
Z
mZ G d dej 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_tuplec e Zd ZdZdZd ZdS )FixThrowTz
power< any trailer< '.' 'throw' >
trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' >
>
|
power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > >
c | j }|d }|j t j u r| |d d S | d }|d S | }t | rd |j dd D }n
d|_ |g}|d }d |v r|d }d|_ t || } t | t d
t |g gz }
| t j |j |
d S | t || d S )Nexcz+Python 3 does not support string exceptionsvalc 6 g | ]}| S )clone).0cs >/opt/alt/python311/lib64/python3.11/lib2to3/fixes/fix_throw.py
<listcomp>z&FixThrow.transform.<locals>.<listcomp>) s :::!AGGII::: argstbwith_traceback)symsr typer STRINGcannot_convertgetr
childrenprefixr r r r replacer Nodepower)selfnoderesultsr r r r
throw_argsr ewith_tbs r transformzFixThrow.transform s[ yen""$$8u|##&STTTF kk% ;FiikkC== ::s|AbD'9:::DDCJ5DV_
7??$$&&BBIS$A1d#34455"GGv{4:w??@@@@@tC/////r N)__name__
__module____qualname__
BM_compatiblePATTERNr. r r r r r s/ MG0 0 0 0 0r r N)__doc__r r pgen2r r
fixer_utilr r r r r
BaseFixr r r r <module>r8 s ? ? <