(node)
return False
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.
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.
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 .
def in_special_context(node):
    """ 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.
        """
    global p0, p1, p2, pats_built
    if not pats_built:
        p0 = patcomp.compile_pattern(p0)
        p1 = patcomp.compile_pattern(p1)
        p2 = patcomp.compile_pattern(p2)
        pats_built = True
    patterns = [p0, p1, p2]
    for pattern, parent in zip(patterns, attr_chain(node, "parent")):
        results = {}
        if pattern.match(parent, results) and results["node"] is node:
            return True
    return False
def in_special_context ( node ) : global p0 , p1 , p2 , pats_built if not pats_built : p0 = patcomp . compile_pattern ( p0 ) p1 = patcomp . compile_pattern ( p1 ) p2 = patcomp . compile_pattern ( p2 ) pats_built = True patterns = [ p0 , p1 , p2 ] for pattern , parent in zip ( patterns , attr_chain ( node , "parent" ) ) : results = { } if pattern . match ( parent , results ) and results [ "node" ] is node : return True return False