boundlab.diff.ops.DiffPair#

class boundlab.diff.ops.DiffPair[source]#

Bases: OpHandler

Lift a boundlab::DiffPair node into a DiffExpr2.

Methods

__init__

condition

Whether this handler applies to these operands (default: always).

handle

Transform the operands; sub-operations go through interp.<op> so the enclosing domain's handlers apply to them too.

override_handler

A copy of this handler that takes precedence over other when both are ready for the same call.

op: str = 'diff_pair'#
handle(interp, x, y, **kwargs)[source]#

Transform the operands; sub-operations go through interp.<op> so the enclosing domain’s handlers apply to them too.

condition(*args, **kwargs)#

Whether this handler applies to these operands (default: always).

override_handler(other)#

A copy of this handler that takes precedence over other when both are ready for the same call.

overrides: list[type[OpHandler]] = []#