php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /usr/lib/python2.6/lib2to3/fixes/ |
files >> //usr/lib/python2.6/lib2to3/fixes/fix_has_key.pyc |
Lc @ si d Z d d k l Z d d k l Z d d k l Z d d k l Z l Z d e i f d YZ d S( 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 ( t pytree( t token( t fixer_base( t Namet parenthesizet FixHasKeyc B s e Z d Z d Z RS( 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 C sv | p t | i } | i i | i j o | i i | i o d S| i d } | d } | i } g } | d D] } | | i qy ~ } | d i } | i d } | o+ g } | D] } | | i q ~ } n | i | i | i | i | i | i | i | i f j o t | } n t | d j o | d } n t i | i | } d | _ t d d d } | o1 t d d d } t i | i | | f } n t i | i | | | f } | o2 t | } t i | i | f t | } n | i i | i | i | i | i | i | i | i | i | i f j o t | } n | | _ | S( Nt negationt anchort beforet argt afteri i u u int prefixu not( t AssertionErrort symst parentt typet not_testt patternt matcht Nonet getR t clonet comparisont and_testt or_testt testt lambdeft argumentR t lenR t Nodet powerR t comp_opt tuplet exprt xor_exprt and_exprt shift_exprt arith_exprt termt factor( t selft nodet resultsR R R R t _[1]t nR R R t _[2]t n_opt n_nott new( ( s/ /usr/lib/python2.6/lib2to3/fixes/fix_has_key.pyt transformG sF ++" & ( t __name__t __module__t PATTERNR1 ( ( ( s/ /usr/lib/python2.6/lib2to3/fixes/fix_has_key.pyR ' s N( t __doc__t R t pgen2R R t fixer_utilR R t BaseFixR ( ( ( s/ /usr/lib/python2.6/lib2to3/fixes/fix_has_key.pyt <module> sy~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`