Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /opt/alt/python38/lib64/python3.8/lib2to3/fixes/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python38/lib64/python3.8/lib2to3/fixes/__pycache__/fix_throw.cpython-38.pyc
U

��,a.�@sZdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZGdd�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@seZdZdZdZdd�ZdS)�FixThrowTz�
    power< any trailer< '.' 'throw' >
           trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' >
    >
    |
    power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > >
    cCs�|j}|d��}|jtjkr.|�|d�dS|�d�}|dkrDdS|��}t|�rndd�|jdd�D�}nd|_	|g}|d	}d
|kr�|d
��}d|_	t
||�}	t|	td��t
|g�g}
|�t�|j|
��n|�t
||��dS)N�excz+Python 3 does not support string exceptions�valcSsg|]}|���qS�)�clone)�.0�cr
r
�</opt/alt/python38/lib64/python3.8/lib2to3/fixes/fix_throw.py�
<listcomp>)sz&FixThrow.transform.<locals>.<listcomp>������args�tb�with_traceback)�symsr�typer�STRINGZcannot_convert�getr	Zchildren�prefixrrrr�replacerZNodeZpower)�selfZnodeZresultsrrrrZ
throw_argsr�eZwith_tbr
r
r�	transforms*

zFixThrow.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr!r
r
r
rr
sr
N)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
r
r
r
r�<module>s



ZeroDay Forums Mini