jacopy.Act

class jacopy.Act(op, arg)

Bases: Expr

Application of an operator to an argument: op(arg).

This is inert, it does not apply Leibniz at construction. The jacopy.algorithms.product_rule pass is the one that rewrites Act(D, Product(...)) into the expanded Leibniz sum.

Parameters:
__init__(op, arg)
Parameters:
Return type:

None

Methods

__init__(op, arg)

clone()

Return self.

find(predicate)

Yield descendants (including self) satisfying predicate.

replace_at(path, new)

Return a new tree with new spliced at path.

substitute_atom(dummy, target)

Return self with every occurrence of dummy replaced by target.

walk()

Pre-order traversal yielding self followed by descendants through children only.

Attributes

arg

children

Tuple of immediate children.

is_atom

op

property children: Tuple[Expr, ...]

Tuple of immediate children. Atoms return ().