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

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Equivalent to 'node.children.append(child)'. This method also sets the
child's parent attribute appropriately.

src/p/y/py3kwarn-HEAD/py3kwarn2to3/tests/test_pytree.py   py3kwarn(Download)
    def test_node_append_child(self):
        n1 = pytree.Node(1000, [])
 
        l1 = pytree.Leaf(100, "foo")
        n1.append_child(l1)
        self.assertEqual(l1.parent, n1)
        self.assertEqual(n1.children, [l1])
 
        l2 = pytree.Leaf(100, "bar")
        n1.append_child(l2)