MCPcopy
hub / github.com/google-deepmind/penzai / select

Function select

penzai/core/selectors.py:1499–1509  ·  view source on GitHub ↗

Wraps a tree in a singleton selection for processing. Args: tree: A tree to select. Returns: A selection of the entire tree. Useful because it allows chaining additional selection methods defined on Selection.

(tree: Any)

Source from the content-addressed store, hash-verified

1497
1498
1499def select(tree: Any) -> Selection:
1500 """Wraps a tree in a singleton selection for processing.
1501
1502 Args:
1503 tree: A tree to select.
1504
1505 Returns:
1506 A selection of the entire tree. Useful because it allows chaining additional
1507 selection methods defined on Selection.
1508 """
1509 return _build_selection_from_boundary(_InProgressSelectionBoundary(tree))

Callers 3

goMethod · 0.85
invertMethod · 0.85
at_childlessMethod · 0.85

Tested by

no test coverage detected