JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbrў f c@sidZddlmZddlmZddlmZddlmZmZGdddej Z dS( u&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(upytree(utoken(u fixer_base(uNameu parenthesizecBs,|EeZdZdZdZddZdS(u FixHasKeyu 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 ','> ) ')' > > > c Cs1|j}|jj|jkr7|jj|jr7dS|jd}|d}|j}dd|dD}|dj }|jd} | rdd| D} n|j|j |j|j |j |j |j|jfkrt|}nt|d kr|d }ntj|j|}d |_td d d } |rxtdd d } tj|j| | f} ntj|j || |f} | rt| } tj|j| ft| } n|jj|j |j|j|j|j|j|j|j|jf kr$t| } n|| _| S(NunegationuanchorcSsg|]}|jqS((uclone(u.0un((u>/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_has_key.pyu Ss u'FixHasKey.transform..ubeforeuarguaftercSsg|]}|jqS((uclone(u.0un((u>/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_has_key.pyu Ws iiu uinuprefixunot(usymsuparentutypeunot_testupatternumatchuNoneugetuprefixucloneu comparisonuand_testuor_testutestulambdefuargumentu parenthesizeulenupytreeuNodeupoweruNameucomp_oputupleuexpruxor_expruand_expru shift_expru arith_exprutermufactor( uselfunodeuresultsusymsunegationuanchoruprefixubeforeuarguafterun_opun_notunew((u>/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_has_key.pyu transformHsD   !   %   uFixHasKey.transformNT(u__name__u __module__u __qualname__uTrueu BM_compatibleuPATTERNu transform(u __locals__((u>/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_has_key.pyu FixHasKey'su FixHasKeyN( u__doc__uupytreeupgen2utokenu fixer_baseu fixer_utiluNameu parenthesizeuBaseFixu FixHasKey(((u>/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_has_key.pyus