Ñò §ÚêLc@sidZddklZddklZddklZddklZlZdei 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 FixHasKeycBseZdZd„ZRS(s• anchor=power< before=any+ trailer< '.' 'has_key' > trailer< '(' ( not(arglist | argument) arg=any ','> ) ')' > after=any* > | negation=not_test< 'not' anchor=power< before=any+ trailer< '.' 'has_key' > trailer< '(' ( not(arglist | argument) arg=any ','> ) ')' > > > cCsv|pt‚|i}|ii|ijo|ii|iƒodS|idƒ}|d}|i }g}|dD]}||i ƒqy~} |di ƒ} |idƒ} | o+g} | D]}| |i ƒqÆ~ } n| i|i |i|i |i |i|i|ifjot| ƒ} nt| ƒdjo| d} nti|i| ƒ} d| _ td d dƒ} |o1td d dƒ}ti|i|| fƒ} nti|i | | | fƒ}| o2t|ƒ}ti|i|ft| ƒƒ}n|ii|i |i|i|i|i|i|i|i|if jot|ƒ}n||_ |S( Ntnegationtanchortbeforetargtafteriiu uintprefixunot( tAssertionErrortsymstparentttypetnot_testtpatterntmatchtNonetgetR tclonet comparisontand_testtor_testttesttlambdeftargumentRtlenRtNodetpowerRtcomp_opttupletexprtxor_exprtand_exprt shift_exprt arith_exprttermtfactor(tselftnodetresultsR RRR t_[1]tnRR R t_[2]tn_optn_nottnew((s1/usr/lib64/python2.6/lib2to3/fixes/fix_has_key.pyt transformGsF   ++"  &   (t__name__t __module__tPATTERNR1(((s1/usr/lib64/python2.6/lib2to3/fixes/fix_has_key.pyR'sN( t__doc__tRtpgen2RRt fixer_utilRRtBaseFixR(((s1/usr/lib64/python2.6/lib2to3/fixes/fix_has_key.pyts