403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/lib2to3/fixes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/lib2to3/fixes/fix_has_key.pyc
ó
—|_c@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 ','>
                )
                ')'
            >
        >
    >
    cCsU|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//usr/lib/python2.7/lib2to3/fixes/fix_has_key.pyt	transformHsF	
	#"!
	%	(t__name__t
__module__tTruet
BM_compatibletPATTERNR/(((s//usr/lib/python2.7/lib2to3/fixes/fix_has_key.pyR'sN(t__doc__tRtpgen2RRt
fixer_utilRRtBaseFixR(((s//usr/lib/python2.7/lib2to3/fixes/fix_has_key.pyt<module>s


Youez - 2016 - github.com/yon3zu
LinuXploit