TypeOperationTemplate

Labs

class TypeOperationTemplate

Description

An operator whose last operand is a type: the template form of x istype T, x hastype T, x @ T, x as T, q @@ M, q meta M and all T.

operand is the first operand, None where the text has none: all T never has one, and istype T (likewise hastype and @) tests self (KerML 7.4.9.2), which instantiation writes as a reference to Base::Anything::self. For @@ and meta it is the MetadataAccessTemplate of the named element. type is the type operand. Equality and hashing compare the operand structurally and the type by element_id, for the reason ReferenceTemplate gives.

Members defined in TypeOperationTemplate (4 members)

operand

RW

operator

RW

type

RW

__hash__

Hash the operator, the operand and the type’s identity.

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

operand: syside.experimental.expressions.ExpressionTemplate | None = None
operator: str = None
type: syside.Type = None

Methods

__hash__() → int

Hash the operator, the operand and the type’s identity.

Used by