A wrapper for :class:`Any`.

    :param as_rules:
        `bool`.  If `False` (by default), each element of `choices`
        is wrapped in the :class:`Equals` validator so they are interpreted
        as literals.

    .. deprecated:: 0.13

       Use :class:`Any` instead.

def one_of(choices, first_is_default=False, as_rules=False):
    """
    A wrapper for :class:`Any`.

    :param as_rules:
        `bool`.  If `False` (by default), each element of `choices`
        is wrapped in the :class:`Equals` validator so they are interpreted
        as literals.

    .. deprecated:: 0.13

       Use :class:`Any` instead.

    """
    assert choices

    if as_rules:
        None    # for coverage
    else:
        choices = [Equals(x) for x in choices]

    return Any(choices, first_is_default=first_is_default)