AlkantarClanX12

Your IP : 18.222.164.176


Current Path : /opt/alt/python312/lib64/python3.12/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/lib2to3/fixes/__pycache__/fix_throw.cpython-312.pyc

�

�Q�f.��r�dZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZGd�dej�Z
y)	z�Fixer 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)�Name�Call�ArgList�Attr�is_tuplec��eZdZdZdZd�Zy)�FixThrowTz�
    power< any trailer< '.' 'throw' >
           trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' >
    >
    |
    power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > >
    c��|j}|dj�}|jtjur|j|d�y|j
d�}|�y|j�}t|�r+|jddD�cgc]}|j���}}n
d|_	|g}|d}d|vry|dj�}	d|	_	t||�}
t|
td	��t|	g�gz}|jtj |j"|��y|jt||��ycc}w)
N�excz+Python 3 does not support string exceptions�val������args�tb�with_traceback)�syms�clone�typer�STRING�cannot_convert�getr
�children�prefixrr	rr�replacer�Node�power)�self�node�resultsrrr�cr�
throw_argsr�e�with_tbs            �>/opt/alt/python312/lib64/python3.12/lib2to3/fixes/fix_throw.py�	transformzFixThrow.transforms)���y�y���e�n�"�"�$���8�8�u�|�|�#�����&S�T���k�k�%� ���;���i�i�k���C�=�'*�|�|�A�b�'9�:�'9�!�A�G�G�I�'9�D�:��C�J��5�D��V�_�
��7�?����$�$�&�B��B�I��S�$��A��1�d�#3�4�5��"����G�G����v�{�{�4�:�:�w�?�@����t�C���/��;s�EN)�__name__�
__module__�__qualname__�
BM_compatible�PATTERNr)��r(rrs���M��G�0r0rN)�__doc__rr�pgen2rr�
fixer_utilrrrr	r
�BaseFixrr/r0r(�<module>r5s-��?����<�<�(0�z�!�!�(0r0