MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / arg

Method arg

lean_py/z3/core.py:341–346  ·  view source on GitHub ↗

Return the i-th argument of this expression.

(self, i: int)

Source from the content-addressed store, hash-verified

339 return len(_ast_children(self._ast))
340
341 def arg(self, i: int) -> ExprRef:
342 """Return the i-th argument of this expression."""
343 children = _ast_children(self._ast)
344 if i < 0 or i >= len(children):
345 raise IndexError(f"arg index {i} out of range (0..{len(children) - 1})")
346 return _child_expr(children[i], self, i)
347
348 def children(self) -> list[ExprRef]:
349 """Return list of all children of this expression."""

Calls 2

_ast_childrenFunction · 0.85
_child_exprFunction · 0.85