Skip to main content

BlankChoiceIterator

Iterator to lazily inject a blank choice.

Attributes

AttributeTypeDescription
choicesiterableThe original collection of choices to be iterated over after the blank choice is potentially injected.
blank_choiceiterableThe specific choice representing a blank or empty selection to be yielded at the start of the iteration if no blank value exists in the original choices.

Constructor

Signature

def BlankChoiceIterator(
choices: iterable,
blank_choice: tuple
) - > null

Parameters

NameTypeDescription
choicesiterableThe original collection of choices to iterate over.
blank_choicetupleThe blank choice option to be prepended if no blank value exists in choices.

Signature

def BlankChoiceIterator(
choices: iterable,
blank_choice: iterable
) - > null

Parameters

NameTypeDescription
choicesiterableThe original collection of choices to be iterated over, which may include nested groups.
blank_choiceiterableAn iterable representing the blank option to prepend if no empty value is found in the original choices.