For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python function
leaves
leaves()
max.tree.leaves(tree: Any, *, leaf: type[_T] | tuple[type[_T], ...], shared: bool = False) → list[_T]
max.tree.leaves(tree: Any, *, leaf: Callable[[Any], bool] | None = None, shared: bool = False) → list[Any]
Returns tree’s leaves, left to right, dropping the structure.
-
Parameters:
-
- tree – The value to read.
- leaf – Where the walk stops.
- shared – Whether an aliased value is one leaf or one per path.