# Path: src/formencode/api.py
# def get_localedir():
# def set_stdtranslation(domain="FormEncode", languages=None,
#                        localedir=get_localedir()):
# def deprecation_warning(old, new=None, stacklevel=3):
# def deprecated(old=None, new=None):
#     def outer(func):
#         def inner(*args, **kwargs):
# def is_empty(value):
# def is_validator(obj):
#     def __init__(self, msg,
#                  value, state, error_list=None, error_dict=None):
#     def __str__(self):
#         def __unicode__(self):
#     def unpack_errors(self, encode_variables=False, dict_char='.',
#                       list_char='-'):
#     def __classinit__(cls, new_attrs):
#     def __init__(self, *args, **kw):
#     def to_python(self, value, state=None):
#     def from_python(self, value, state=None):
#         def _message_vars_decode(self, message_vars):
#     def message(self, msgName, state, **kw):
#     def all_messages(self):
#     def subvalidators(self):
#     def _initialize_docstring(cls):
#     def __repr__(self):
#     def __classinit__(cls, new_attrs):
#     def to_python(self, value, state=None):
#     def from_python(self, value, state=None):
#     def is_empty(self, value):
#     def empty_value(self, value):
#     def assert_string(self, value, state):
#     def base64encode(self, value):
#     def _validate_noop(self, value, state=None):
# class NoDefault(object):
# class Invalid(Exception):
# class Validator(declarative.Declarative):
# class _Identity(Validator):
# class FancyValidator(Validator):


from .api import (FancyValidator, Identity, Invalid, NoDefault, Validator,
    is_validator)
import six
############################################################
## Compound Validators
############################################################


def to_python(validator, value, state):
    return validator.to_python(value, state)


def from_python(validator, value, state):
    return validator.from_python(value, state)


class CompoundValidator(FancyValidator):
    """Base class for all compound validators."""

    if_invalid = NoDefault
    accept_iterator = False

    validators = []

    __unpackargs__ = ('*', 'validatorArgs')

    __mutableattributes__ = ('validators',)

    _deprecated_methods = (
        ('attempt_convert', '_attempt_convert'),)

    @staticmethod
    def __classinit__(cls, new_attrs):

# Path: src/formencode/api.py
# def get_localedir():
# def set_stdtranslation(domain="FormEncode", languages=None,
#                        localedir=get_localedir()):
# def deprecation_warning(old, new=None, stacklevel=3):
# def deprecated(old=None, new=None):
#     def outer(func):
#         def inner(*args, **kwargs):
# def is_empty(value):
# def is_validator(obj):
#     def __init__(self, msg,
#                  value, state, error_list=None, error_dict=None):
#     def __str__(self):
#         def __unicode__(self):
#     def unpack_errors(self, encode_variables=False, dict_char='.',
#                       list_char='-'):
#     def __classinit__(cls, new_attrs):
#     def __init__(self, *args, **kw):
#     def to_python(self, value, state=None):
#     def from_python(self, value, state=None):
#         def _message_vars_decode(self, message_vars):
#     def message(self, msgName, state, **kw):
#     def all_messages(self):
#     def subvalidators(self):
#     def _initialize_docstring(cls):
#     def __repr__(self):
#     def __classinit__(cls, new_attrs):
#     def to_python(self, value, state=None):
#     def from_python(self, value, state=None):
#     def is_empty(self, value):
#     def empty_value(self, value):
#     def assert_string(self, value, state):
#     def base64encode(self, value):
#     def _validate_noop(self, value, state=None):
# class NoDefault(object):
# class Invalid(Exception):
# class Validator(declarative.Declarative):
# class _Identity(Validator):
# class FancyValidator(Validator):


# Path: src/formencode/compound.py
from .api import (FancyValidator, Identity, Invalid, NoDefault, Validator,
    is_validator)
import six

############################################################
## Compound Validators
############################################################


def to_python(validator, value, state):
    return validator.to_python(value, state)


def from_python(validator, value, state):
    return validator.from_python(value, state)


class CompoundValidator(FancyValidator):
    """Base class for all compound validators."""

    if_invalid = NoDefault
    accept_iterator = False

    validators = []

    __unpackargs__ = ('*', 'validatorArgs')

    __mutableattributes__ = ('validators',)

    _deprecated_methods = (
        ('attempt_convert', '_attempt_convert'),)

    @staticmethod
    def __classinit__(cls, new_attrs):

        FancyValidator.__classinit__(cls, new_attrs)