HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //opt/alt/python27/lib64/python2.7/lib2to3/fixes/fix_has_key.pyc
�
3Y~gc@sidZddlmZddlmZddlmZddlmZmZdej	fd��YZ
dS(	s&Fixer for has_key().

Calls to .has_key() methods are expressed in terms of the 'in'
operator:

    d.has_key(k) -> k in d

CAVEATS:
1) While the primary target of this fixer is dict.has_key(), the
   fixer will change any has_key() method call, regardless of its
   class.

2) Cases like this will not be converted:

    m = d.has_key
    if m(k):
        ...

   Only *calls* to has_key() are converted. While it is possible to
   convert the above to something like

    m = d.__contains__
    if m(k):
        ...

   this is currently not done.
i(tpytree(ttoken(t
fixer_base(tNametparenthesizet	FixHasKeycBseZeZdZd�ZRS(s�
    anchor=power<
        before=any+
        trailer< '.' 'has_key' >
        trailer<
            '('
            ( not(arglist | argument<any '=' any>) arg=any
            | arglist<(not argument<any '=' any>) arg=any ','>
            )
            ')'
        >
        after=any*
    >
    |
    negation=not_test<
        'not'
        anchor=power<
            before=any+
            trailer< '.' 'has_key' >
            trailer<
                '('
                ( not(arglist | argument<any '=' any>) arg=any
                | arglist<(not argument<any '=' any>) arg=any ','>
                )
                ')'
            >
        >
    >
    c
CsU|st�|j}|jj|jkrC|jj|j�rCdS|jd�}|d}|j	}g|dD]}|j
�^qp}|dj
�}	|jd�}
|
r�g|
D]}|j
�^q�}
n|	j|j|j|j|j
|j|j|jfkrt|	�}	nt|�dkr6|d}ntj|j|�}d|_	td	d
d�}|r�tdd
d�}tj|j||f�}ntj|j|	||f�}
|
r�t|
�}
tj|j|
ft|
��}
n|jj|j|j|j|j|j|j|j|j|jf	krHt|
�}
n||
_	|
S(Ntnegationtanchortbeforetargtafteriiu uintprefixunot( tAssertionErrortsymstparentttypetnot_testtpatterntmatchtNonetgetRtclonet
comparisontand_testtor_testttesttlambdeftargumentRtlenRtNodetpowerRtcomp_opttupletexprtxor_exprtand_exprt
shift_exprt
arith_exprttermtfactor(tselftnodetresultsR
RRRtnRR	R
tn_optn_nottnew((s>/opt/alt/python27/lib64/python2.7/lib2to3/fixes/fix_has_key.pyt	transformHsF	
	#"!
	%	(t__name__t
__module__tTruet
BM_compatibletPATTERNR/(((s>/opt/alt/python27/lib64/python2.7/lib2to3/fixes/fix_has_key.pyR'sN(t__doc__tRtpgen2RRt
fixer_utilRRtBaseFixR(((s>/opt/alt/python27/lib64/python2.7/lib2to3/fixes/fix_has_key.pyt<module>s