import functools
import types
import collections.abc
from abc import abstractmethod, ABCMeta

from gettext import gettext as _

from skame.exceptions import SchemaError, SchemaErrors
from skame.utils import compose


class Optional:
    """Special class to mark fields as optional."""
    __slots__ = ("name",)

    def __init__(self, name: str):
        self.name = name