(
    *args: Union[str, int, float, bool, Dict[Any, Any], List[Any], ChoiceSweep]
)
return ChoiceSweep(list=list(args))
A choice sweep over the specified values
A choice sweep over the specified values
A choice sweep over the specified values
def choice(
    *args: Union[str, int, float, bool, Dict[Any, Any], List[Any], ChoiceSweep]
) -> ChoiceSweep:
    """
    A choice sweep over the specified values
    """
    if len(args) == 0:
        raise ValueError("empty choice is not legal")
    if len(args) == 1:
        first = args[0]
        if isinstance(first, ChoiceSweep):
            if first.simple_form:
                first.simple_form = False
                return first
            else:
                raise ValueError("nesting choices is not supported")

    return ChoiceSweep(list=list(args))
def choice ( * args : Union [ str , int , float , bool , Dict [ Any , Any ] , List [ Any ] , ChoiceSweep ] ) -> ChoiceSweep : if len ( args ) == 0 : raise ValueError ( "empty choice is not legal" ) if len ( args ) == 1 : first = args [ 0 ] if isinstance ( first , ChoiceSweep ) : if first . simple_form : first . simple_form = False return first else : raise ValueError ( "nesting choices is not supported" ) return ChoiceSweep ( list = list ( args ) )