pyds.Attribute

class pyds.Attribute(identifier, value, validate_identifier=True)

Bases: pyds.Statement

Represents a PDS attribute assignment statement.

Parameters
  • identifier (str)

    Identifier of the attribute.

  • value (Value)

    Value of the attribute. This should be an instance of one of the non-abstract subclasses of Value.

  • validate_identifier (True or False)

    Whether identifier should be checked to see if it’s a valid identifer for a PDS attribute assignment statement. Default is True.

Raises
  • TypeError

    If value is not a instance of Value.

  • ValueError

    If validate_identifier is True and identifier is not a valid identifier for an attribute assignment statement.

Attributes
identifier

Identifier of the attribute. A str instance. Read-only.

value

Value of the attribute. An instance of one of the non-abstract subclasses of Value. Read-only.


Special Methods

Attribute.__str__()

Return a PDS serialized string (str) representing the object.

Called by str().