class documentation

class Tag(bb.Union): (source)

View In Hierarchy

Tag that can be added in multiple ways. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. :ivar UserGeneratedTag Tag.user_generated_tag: Tag generated by the user.

Class Method user_generated_tag Create an instance of this class set to the ``user_generated_tag`` tag with value ``val``.
Method get_user_generated_tag Tag generated by the user.
Method is_other Check if the union tag is ``other``.
Method is_user_generated_tag Check if the union tag is ``user_generated_tag``.
Class Variable other Undocumented
Method _process_custom_annotations Undocumented
Class Variable _catch_all Undocumented
@classmethod
def user_generated_tag(cls, val): (source)

Create an instance of this class set to the ``user_generated_tag`` tag with value ``val``. :param UserGeneratedTag val: :rtype: Tag

def get_user_generated_tag(self): (source)

Tag generated by the user. Only call this if :meth:`is_user_generated_tag` is true. :rtype: UserGeneratedTag

def is_other(self): (source)

Check if the union tag is ``other``. :rtype: bool

def is_user_generated_tag(self): (source)

Check if the union tag is ``user_generated_tag``. :rtype: bool

Undocumented

def _process_custom_annotations(self, annotation_type, field_path, processor): (source)

Undocumented

_catch_all: str = (source)

Undocumented