HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/lib2to3/fixes/__pycache__/fix_throw.cpython-311.opt-1.pyc
�

��Vcf��p�dZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZGd�dej��Z
dS)	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�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���}|jtjur|�|d��dS|�d��}|�dS|���}t|��rd�|jdd�D��}n
d|_	|g}|d}d	|vr�|d	���}d|_	t||��}	t|	td
����t|g��gz}
|�tj|j|
����dS|�t||����dS)N�excz+Python 3 does not support string exceptions�valc�6�g|]}|�����S�)�clone)�.0�cs  �+D:\Python311\Lib\lib2to3\fixes\fix_throw.py�
<listcomp>z&FixThrow.transform.<locals>.<listcomp>)s ��:�:�:�!�A�G�G�I�I�:�:�:�������args�tb�with_traceback)�symsr�typer�STRING�cannot_convert�getr
�children�prefixrr	rr�replacer�Node�power)�self�node�resultsrrrr�
throw_argsr�e�with_tbs           r�	transformzFixThrow.transformsc���y���e�n�"�"�$�$���8�u�|�#�	�����&S�T�T�T��F��k�k�%� � ���	��F��i�i�k�k���C�=�=�	�:�:�s�|�A�b�D�'9�:�:�:�D�D��C�J��5�D��V�_�
��7�?�	0����$�$�&�&�B��B�I��S�$���A��1�d�#3�4�4�5�5��"�����G�G����v�{�4�:�w�?�?�@�@�@�@�@����t�C����/�/�/�/�/rN)�__name__�
__module__�__qualname__�
BM_compatible�PATTERNr.rrrrrs/�������M��G�0�0�0�0�0rrN)�__doc__rr�pgen2rr�
fixer_utilrrrr	r
�BaseFixrrrr�<module>r8s���?�?�������������������<�<�<�<�<�<�<�<�<�<�<�<�<�<�(0�(0�(0�(0�(0�z�!�(0�(0�(0�(0�(0r