1(getPrintable := lambda x: __import__('re').sub(r',$', '', str(x).strip('()')), printTexts := {'in': lambda x: print(f"Invalid input arguments, expected {getPrintable(x)}!"), 'out': lambda x: print(f"Invalid output value, expected {getPrintable(x)}!")}, checkTypes := lambda args, types: all(isinstance(item, types) for item in args), type_check := lambda t: lambda *toCheck: lambda func: (__checks :={'in': lambda *args, **kwargs:(printTexts[t](toCheck) if not checkTypes([*args, *kwargs.values()], toCheck) else None, func(*args, **kwargs))[1],'out': lambda *args, **kwargs: (res := func(*args, **kwargs), printTexts[t](toCheck) if not checkTypes([res], toCheck) else None)[0]}, __checks[t])[1])
....
----------------------------------------------------------------------
Ran 4 tests in 0.002s
OK
Михаил Цанков
24.10.2024 20:09Бойкот няма коментар как да си го фиксна
Като не сте ми върнали обратна връзка
|