if inspect.isclass(func): F = spye.validation.StandardFunction(func.__init__, str(self.exp)) elif hasattr(func, '__call__'): if hasattr(func.__call__, 'func_code'): F = spye.validation.StandardFunction(func.__call__, str(self.exp)) else: F = BuiltinFunction(func, str(self.exp)) else: self.print_exec_error("Trying to call uncallable object of type [%s]", type(func).__name__) return None