class pyasn1.type.namedtype.OptionalNamedType(name, asn1Object)

Create named field object for a constructed ASN.1 type.

The OptionalNamedType object represents a single name and ASN.1 type of a constructed ASN.1 type.

OptionalNamedType objects are immutable and duck-type Python tuple objects holding name and asn1Object components.

  • name (str) – Field name
  • asn1Object – ASN.1 type object


The OptionalNamedType class models an optional field of a constructed ASN.1 type.