Skip to content

Latest commit

 

History

History
73 lines (55 loc) · 1.61 KB

File metadata and controls

73 lines (55 loc) · 1.61 KB

description: Reroot to a new path, maintaining a input proto index.

expression_impl.reroot.reroot

View source on GitHub

Reroot to a new path, maintaining a input proto index.

expression_impl.reroot.reroot(
    root: expression.Expression,
    source_path: path.Path
) -> expression.Expression

Similar to root.get_descendant_or_error(source_path): however, this method retains the ability to get a map to the original index.

Args

`root` the original root.
`source_path` the path to the new root.

Returns

the new root.