/usr/lib/python3.10/lib2to3/fixes/__pycache__
NameSizeModeActions
fix_apply.cpython-310.pyc16520644editdlrm
fix_asserts.cpython-310.pyc12770644editdlrm
fix_basestring.cpython-310.pyc6610644editdlrm
fix_buffer.cpython-310.pyc8060644editdlrm
fix_dict.cpython-310.pyc32870644editdlrm
fix_except.cpython-310.pyc27720644editdlrm
fix_exec.cpython-310.pyc11310644editdlrm
fix_execfile.cpython-310.pyc16770644editdlrm
fix_exitfunc.cpython-310.pyc23060644editdlrm
fix_filter.cpython-310.pyc24400644editdlrm
fix_funcattrs.cpython-310.pyc9740644editdlrm
fix_future.cpython-310.pyc7820644editdlrm
fix_getcwdu.cpython-310.pyc7860644editdlrm
fix_has_key.cpython-310.pyc28770644editdlrm
fix_idioms.cpython-310.pyc39050644editdlrm
fix_import.cpython-310.pyc28110644editdlrm
fix_imports.cpython-310.pyc46270644editdlrm
fix_imports2.cpython-310.pyc5440644editdlrm
fix_input.cpython-310.pyc9480644editdlrm
fix_intern.cpython-310.pyc11300644editdlrm
fix_isinstance.cpython-310.pyc15550644editdlrm
fix_itertools.cpython-310.pyc15460644editdlrm
fix_itertools_imports.cpython-310.pyc15660644editdlrm
fix_long.cpython-310.pyc7090644editdlrm
fix_map.cpython-310.pyc30750644editdlrm
fix_metaclass.cpython-310.pyc54050644editdlrm
fix_methodattrs.cpython-310.pyc9360644editdlrm
fix_ne.cpython-310.pyc8090644editdlrm
fix_next.cpython-310.pyc30770644editdlrm
fix_nonzero.cpython-310.pyc9210644editdlrm
fix_numliterals.cpython-310.pyc10210644editdlrm
fix_operator.cpython-310.pyc41520644editdlrm
fix_paren.cpython-310.pyc13870644editdlrm
fix_print.cpython-310.pyc23090644editdlrm
fix_raise.cpython-310.pyc22490644editdlrm
fix_raw_input.cpython-310.pyc7930644editdlrm
fix_reduce.cpython-310.pyc11260644editdlrm
fix_reload.cpython-310.pyc11420644editdlrm
fix_renames.cpython-310.pyc20250644editdlrm
fix_repr.cpython-310.pyc8430644editdlrm
fix_set_literal.cpython-310.pyc16830644editdlrm
fix_standarderror.cpython-310.pyc7180644editdlrm
fix_sys_exc.cpython-310.pyc14110644editdlrm
fix_throw.cpython-310.pyc18060644editdlrm
fix_tuple_params.cpython-310.pyc45890644editdlrm
fix_types.cpython-310.pyc19410644editdlrm
fix_unicode.cpython-310.pyc15530644editdlrm
fix_urllib.cpython-310.pyc58800644editdlrm
fix_ws_comma.cpython-310.pyc11170644editdlrm
fix_xrange.cpython-310.pyc25270644editdlrm
fix_xreadlines.cpython-310.pyc11210644editdlrm
fix_zip.cpython-310.pyc15790644editdlrm
__init__.cpython-310.pyc1380644editdlrm
Edit: /usr/lib/python3.10/lib2to3/fixes/__pycache__/fix_has_key.cpython-310.pyc (2877B)
o bc| @sBdZddlmZddlmZddlmZmZGdddejZdS)a&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. )pytree) fixer_base)Name parenthesizec@seZdZdZdZddZdS) FixHasKeyTa 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 Cs|sJ|j}|jj|jkr|j|jrdS|d}|d}|j}dd|dD}|d}|d} | r@dd| D} |j|j |j|j |j |j |j |jfvrWt|}t|d krb|d }nt|j|}d |_td d d } |rtdd d } t|j| | f} t|j || |f} | rt| } t|j| ft| } |jj|j |j|j|j|j|j|j|j|jf vrt| } || _| S)NnegationanchorcSg|]}|qSclone.0nr r 0/usr/lib/python3.10/lib2to3/fixes/fix_has_key.py Rz'FixHasKey.transform..beforeargaftercSr r r r r r rrVr in)prefixnot)symsparenttypenot_testpatternmatchgetrr comparisonand_testor_testtestlambdefargumentrlenrNodepowerrcomp_optupleexprxor_exprand_expr shift_expr arith_exprtermfactor) selfnoderesultsrrrrrrrn_opn_notnewr r r transformGsL        zFixHasKey.transformN)__name__ __module__ __qualname__ BM_compatiblePATTERNr;r r r rr&s rN) __doc__rr fixer_utilrrBaseFixrr r r rs