Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Find the top level namespace.

        def find_root(node):
    """Find the top level namespace."""
    # Scamper up to the top level namespace
    while node.type != syms.file_input:
        assert node.parent, "Tree is insane! root found before "\
                           "file_input node was found."
        node = node.parent
    return node
        


src/p/y/py3kwarn-HEAD/py3kwarn/main.py   py3kwarn(Download)
 
from py3kwarn2to3 import refactor, pytree
from py3kwarn2to3.fixer_util import find_root
 
 
 
                        try:
                            find_root(node)
                        except AssertionError:
                            # this node has been cut off from a

src/p/y/py3kwarn-0.4.4/py3kwarn/main.py   py3kwarn(Download)
 
from py3kwarn2to3 import refactor, pytree
from py3kwarn2to3.fixer_util import find_root
 
 
 
                        try:
                            find_root(node)
                        except AssertionError:
                            # this node has been cut off from a