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 :  /lib64/python2.7/lib2to3/fixes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/lib2to3/fixes/fix_isinstance.pyc
�
U��dc@sCdZddlmZddlmZdejfd��YZdS(s,Fixer that cleans up a tuple argument to isinstance after the tokens
in it were fixed.  This is mainly used to remove double occurrences of
tokens as a leftover of the long -> int / unicode -> str conversion.

eg.  isinstance(x, (int, long)) -> isinstance(x, (int, int))
       -> isinstance(x, int)
i(t
fixer_base(ttokent
FixIsinstancecBs#eZeZdZdZd�ZRS(s�
    power<
        'isinstance'
        trailer< '(' arglist< any ',' atom< '('
            args=testlist_gexp< any+ >
        ')' > > ')' >
    >
    icCsUt�}|d}|j}g}t|�}x�|D]�\}}	|	jtjkr�|	j|kr�|t|�dkr�||djtjkr�|j	�q5q�q5|j
|	�|	jtjkr5|j|	j�q5q5W|r|djtjkr|d=nt|�dkr@|j}
|
j
|d_
|
j|d�n||(|j�dS(Ntargsii����i(tsettchildrent	enumeratettypeRtNAMEtvaluetlentCOMMAtnexttappendtaddtparenttprefixtreplacetchanged(tselftnodetresultstnames_insertedttestlistRtnew_argstiteratortidxtargtatom((s4/usr/lib64/python2.7/lib2to3/fixes/fix_isinstance.pyt	transforms*	
	!0
	

	(t__name__t
__module__tTruet
BM_compatibletPATTERNt	run_orderR(((s4/usr/lib64/python2.7/lib2to3/fixes/fix_isinstance.pyRsN(t__doc__tRt
fixer_utilRtBaseFixR(((s4/usr/lib64/python2.7/lib2to3/fixes/fix_isinstance.pyt<module>
s

ZeroDay Forums Mini