concepts.dsl.dsl_types.SequenceValueType#

class SequenceValueType[source]#

Bases: ValueType

The SequenceValueType corresponds to a sequence of values of a certain type.

Methods

assignment_type()

Return the value type for assignment.

downcast_compatible(other[, ...])

Check if the type is downcast-compatible with the other type; that is, if this type is a subtype of the other type.

long_str()

Return the long string representation of the type.

short_str()

Return the short string representation of the type.

Attributes

alias

An optional alias of the type.

is_list_type

Return whether the type is a list type.

parent_type

The parent type of the type.

parent_typename

Return the typename of the parent type.

typename

The (full) typename of the type.

value_type

The value type of the sequence.

__init__(value_type, alias=None)[source]#

Initialize the sequence value type.

Parameters:
  • value_type (ValueType) – The value type of the sequence.

  • alias (str | None) –

__new__(**kwargs)#
assignment_type()[source]#

Return the value type for assignment.

Return type:

ValueType

downcast_compatible(other, allow_self_list=False, allow_list=False)#

Check if the type is downcast-compatible with the other type; that is, if this type is a subtype of the other type.

Parameters:
  • other (TypeBase) – the other type.

  • allow_self_list (bool) – if True, this type can be a list type derived from the other type.

  • allow_list (bool) – if True, the other type can be a list type derived from the type.

Return type:

bool

long_str()[source]#

Return the long string representation of the type.

Return type:

str

short_str()#

Return the short string representation of the type.

Return type:

str

property alias: str | None#

An optional alias of the type.

property is_list_type#

Return whether the type is a list type.

property parent_type: TypeBase | None#

The parent type of the type.

property parent_typename#

Return the typename of the parent type.

property typename: str#

The (full) typename of the type.

value_type: ValueType#

The value type of the sequence.