def __init__(self, function): super().__init__(function) self.__converters = {bool: self.boolean_conversion} self._errors = ErrorMessage( 'While calling {}:', "got arg '{name}' as '{value}' of type '{typename}' " "which cannot be converted to '{expectedtype}'", get_signature(function))
def __init__(self, function): self._function = function functools.update_wrapper(self, function) self.__signature = inspect.signature(function) self._specs = inspect.getfullargspec(self._function) self._self = None self._errors = ErrorMessage( 'While calling {}:', "parameter '{name}' had value '{value}' of type '{typename}'", get_signature(function))