Files
PowerToys/PythonHome/Lib/lib2to3/fixes/fix_exitfunc.pyc

30 lines
2.6 KiB
Plaintext
Raw Normal View History

2014-07-09 18:15:23 +08:00
<03>
<EFBFBD>W`Sc@sgdZddlmZmZddlmZmZmZmZm Z m
Z
dej fd<00><00>YZ dS(s7
Convert use of sys.exitfunc to use the atexit module.
i<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(tpytreet
fixer_base(tNametAttrtCalltCommatNewlinetsymst FixExitfunccBs5eZeZeZdZd<00>Zd<00>Zd<00>ZRS(s<>
(
sys_import=import_name<'import'
('sys'
|
dotted_as_names< (any ',')* 'sys' (',' any)* >
)
>
|
expr_stmt<
power< 'sys' trailer< '.' 'exitfunc' > >
'=' func=any >
)
cGstt|<00>j|<00>dS(N(tsuperRt__init__(tselftargs((s#.\Lib\lib2to3\fixes\fix_exitfunc.pyR
scCs&tt|<00>j||<00>d|_dS(N(R Rt
start_treetNonet
sys_import(R ttreetfilename((s#.\Lib\lib2to3\fixes\fix_exitfunc.pyR !sc Cs<>d|kr/|jdkr+|d|_ndS|dj<00>}d|_tjtjtt d<00>t d<00><00><00>}t
||g|j<00>}|j |<00>|jdkr<>|j |d<00>dS|jj d}|jtjkr|jt<00><00>|jt dd<00><00>n<>|jj}|j j|j<00>}|j} tjtjt d <00>t dd<00>g<00>}
tjtj|
g<00>} |j|dt<00><00>|j|d
| <00>dS( NRtfuncuuatexituregistersKCan't find sys import; Please add an atexit import at the top of your file.iu uimporti(RRtclonetprefixRtNodeRtpowerRRRtreplacetwarningtchildrenttypetdotted_as_namest append_childRtparenttindext import_namet simple_stmtt insert_childR( R tnodetresultsRtregistertcalltnamestcontaining_stmttpositiontstmt_containert
new_importtnew((s#.\Lib\lib2to3\fixes\fix_exitfunc.pyt transform%s2       ( t__name__t
__module__tTruetkeep_line_ordert BM_compatibletPATTERNR
R R,(((s#.\Lib\lib2to3\fixes\fix_exitfunc.pyR s   N( t__doc__tlib2to3RRtlib2to3.fixer_utilRRRRRRtBaseFixR(((s#.\Lib\lib2to3\fixes\fix_exitfunc.pyt<module>s.