LiteralTemplate

Labs

class LiteralTemplate

Description

A literal value: the template form of 3, 4.5, "a", true.

Equality compares the value’s Python type as well as the value itself, because the type selects the literal element-kind: literal(1) instantiates a LiteralInteger and literal(True) a LiteralBoolean, so they must not compare equal even though 1 == True in Python (and likewise for 1 and 1.0).

Members defined in LiteralTemplate (2 members)

value

RW

__hash__

Hash the value together with its Python type.

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

value: syside.experimental.expressions.LiteralValue = None

Methods

__hash__() → int

Hash the value together with its Python type.

Used by