GIF89a; EcchiShell v1.0
//lib64/python2.7/lib2to3/

Mass Deface b, b.foo-> c, etc, use this to iterate over all objects in the chain. Iteration is terminated by getattr(x, attr) is None. Args: obj: the starting object attr: the name of the chaining attribute Yields: Each successive object in the chain. N(tgetattr(RRtnext((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt attr_chainŖs sefor_stmt< 'for' any 'in' node=any ':' any* > | comp_for< 'for' any 'in' node=any any* > s³ power< ( 'iter' | 'list' | 'tuple' | 'sorted' | 'set' | 'sum' | 'any' | 'all' | 'enumerate' | (any* trailer< '.' 'join' >) ) trailer< '(' node=any ')' > any* > s` power< ( 'sorted' | 'enumerate' ) trailer< '(' arglist ')' > any* > cCs¤ts<tjtƒatjtƒatjtƒatantttg}xRt|t|dƒƒD]8\}}i}|j ||ƒrd|d|krdtSqdWt S(s Returns true if node is in an environment where all that is required of it is being iterable (ie, it doesn't matter if it returns a list or an iterator). See test_map_nochange in test_fixers.py for some examples and tests. tparentR(( t pats_builtRtcompile_patterntp0tp1tp2RRtzipRbtmatchtFalse(R(tpatternstpatternRctresults((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytin_special_contextŠs %"cCsŁ|j}|dk r+|jtjkr+tS|j}|jtjtj fkrStS|jtj kr||j d|kr|tS|jtj ksŃ|jtj krÕ|dk r¾|jtjksŃ|j d|krÕtStS(sG Check that something isn't an attribute or function name etc. iN(t prev_siblingR+ttypeRR!RkRcRtfuncdeftclassdeft expr_stmtROt parameterst typedargslistRRR(R(tprevRc((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytis_probably_builtinćs  %cCspxi|dk rk|jtjkr_t|jƒdkr_|jd}|jtjkr_|jSn|j }qWdS(sFind the indentation of *node*.iiuN( R+RqRtsuiteRSRORtINDENTR Rc(R(tindent((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytfind_indentationśs'   cCsW|jtjkr|S|jƒ}|jd}|_ttj|gƒ}||_|S(N(RqRRyR"RcR+R(R(RcRy((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt make_suites  cCs;x4|jtjkr6|j}|stdƒ‚qqW|S(sFind the top level namespace.s,root found before file_input node was found.(RqRt file_inputRct ValueError(R(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt find_roots  cCs"t|t|ƒ|ƒ}t|ƒS(sŽ Returns true if name is imported from package at the top level of the tree which node belongs to. To cover the case of an import like 'import foo', use None for the package and 'foo' for the name. (t find_bindingR€tbool(tpackageRR(tbinding((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytdoes_tree_importscCs|jtjtjfkS(s0Returns true if the node is an import statement.(RqRt import_nameRK(R(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt is_import"sc CsÆd„}t|ƒ}t|||ƒr+dSd}}xnt|jƒD]]\}}||ƒscqEnx1t|j|ƒD]\}}||ƒswPqwqwW||}PqEW|dkrxbt|jƒD]N\}}|jtjkrĀ|jrĀ|jdjtjkrĀ|d}PqĀqĀWn|dkr\t tj t tj dƒt tj |ddƒgƒ} n$t|t tj |ddƒgƒ} | tƒg} |j|t tj| ƒƒdS(s\ Works like `does_tree_import` but adds an import statement if it was not imported. cSs,|jtjko+|jo+t|jdƒS(Ni(RqRt simple_stmtROR‡(R(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytis_import_stmt)sNiiuimportRu (R€R…R_RORqRRˆRR8R+RR†RRRQR/R#( RƒRR(R‰troott insert_postoffsettidxtnode2timport_RO((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt touch_import&s4            !$c CsKxD|jD]9}d}|jtjkrst||jdƒrB|St|t|jdƒ|ƒ}|r |}q n­|jtjtj fkræt|t|jdƒ|ƒ}|r |}q na|jtj kr|t|t|jdƒ|ƒ}|r’|}q xt |jdƒD]b\}}|jt j kr|jdkrt|t|j|dƒ|ƒ}|ru|}quqqWn¤|jtkrŖ|jdj|krŖ|}nvt|||ƒrÅ|}n[|jtjkrģt|||ƒ}n4|jtjkr t||jdƒr |}q n|r |s0|St|ƒrC|Sq q WdS( sŗ Returns the node which binds variable name, otherwise None. If optional argument package is supplied, only imports will be returned. See test cases for examples.ii’’’’iit:iiN(ROR+RqRtfor_stmtt_findRR}tif_stmtt while_stmtttry_stmtR_RtCOLONR t _def_symst_is_import_bindingRˆRtR‡(RR(RƒtchildtretR2titkid((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyRTsH    !#%     cCs||g}xl|rw|jƒ}|jdkrO|jtkrO|j|jƒq |jtjkr |j|kr |Sq WdS(Ni( tpopRqt _block_symstextendRORRR R+(RR(tnodes((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyR“s   !cCs'|jtjkr| r|jd}|jtjkr£xŌ|jD]Z}|jtjkrw|jdj|krœ|SqB|jtjkrB|j|krB|SqBWq#|jtjkrź|jd}|jtjkr|j|kr|Sq#|jtjkr#|j|kr#|Sn|jtj kr#|rMt |jdƒj ƒ|krMdS|jd}|rst d|ƒrsdS|jtjkr˜t ||ƒr˜|S|jtjkrß|jd}|jtjkr |j|kr |Sq#|jtjkr|j|kr|S|r#|jtjkr#|SndS(s› Will reuturn node if node will import name, or node will import * from package. None is returned otherwise. See test cases for examples. iii’’’’iuasN(RqRR†ROtdotted_as_namestdotted_as_nameR RRRKtunicodetstripR+R“RJtimport_as_nametSTAR(R(RRƒRPRštlastR2((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyR™‰s@ !  !!% ! !!N(:t__doc__t itertoolsRtpgen2RtpytreeRRtpygramRRtRR R RRR+RRR RR)R-R/R0R3R7R:RHRQRTRURVRXtconsuming_callsRbRfRgRhRkRdRoRxR|R}R€R…R‡RRsRrR˜RRRŸR“R™(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytsZ                       - *