astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- asdf v »
- Developer API »
- walk

# walk

asdf.treeutil.walk(top, callback)

  Walking through a tree of objects, calling a given function at each node.

  Parameters:
    top object

      The root of the tree. May be a dict, list or other Python object.

    callback callable

      A function to call at each node in the tree.

      The callback is called on an instance after all of its children have been visited (depth-first order).

  Returns:
    tree object

      The modified tree.