InvocationTemplate

Labs

class InvocationTemplate

Description

A function invocation: the template form of f(a, b) or f(x=a, y=b).

function is the invoked type (a calculation definition, say), and the arguments are positional or named – one or the other, as in the textual syntax. A named argument pairs the function’s input parameter, a Feature, with its value; call() resolves the keyword names to those parameters. Equality and hashing use the element_id of the function and of each parameter, for the reason ReferenceTemplate gives, and compare the argument templates structurally.

Members defined in InvocationTemplate (4 members)

arguments

RW

function

RW

named_arguments

RW

__hash__

Hash the function’s identity with the arguments.

Members inherited from ExpressionTemplate (13 members)

__add__

__bool__

Raise: a template is an expression tree, not a truth value.

__mod__

__mul__

__neg__

__pos__

__radd__

__rmod__

__rmul__

__rsub__

__rtruediv__

__sub__

__truediv__

Attributes

arguments: tuple[syside.experimental.expressions.ExpressionTemplate, ...] = None
function: syside.Type = None
named_arguments: tuple[tuple[syside.Feature, syside.experimental.expressions.ExpressionTemplate], ...] = None

Methods

__hash__() → int

Hash the function’s identity with the arguments.

Used by