• File: fix_throw.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib64/python3.7/lib2to3/fixes/__pycache__/fix_throw.cpython-37.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 1.76 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

Rj.@sZdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZGdddej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@seZdZdZdZddZdS)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.||ddS|d}|dkrDdS|}t|rndd|jddD}nd|_	|g}|d	}d
|kr|d
}d|_	t
||}	t|	tdt
|gg}
|t|j|
n|t
||dS)Nexcz+Python 3 does not support string exceptionsvalcSsg|]}|qS)clone).0cr
r
</opt/alt/python37/lib64/python3.7/lib2to3/fixes/fix_throw.py
<listcomp>)sz&FixThrow.transform.<locals>.<listcomp>argstbwith_traceback)symsrtyperSTRINGZcannot_convertgetr	ZchildrenprefixrrrrreplacerZNodeZpower)selfZnodeZresultsrrrrZ
throw_argsreZwith_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