DSMStructureField

class dsviper.DSMStructureField

Bases: object

One field of a struct, as declared: its name, its type, and the value it defaults to.

Note: Not directly instantiable.

default_value() → DSMLiteral

Return the literal the field defaults to; a field that declares no default answers a DSMLiteralValue whose domain() is ‘None’.

documentation() → str

Return the field’s documentation - its doc comment in the DSM text, or the documentation given to Definitions - empty when there is none.

name() → str

Return the field name as declared.

type() → DSMType

Return the DSMType the field is declared with.