s = [0.55, 0.25, 0.53, 0.45, 0.55]
# s[i] = s[i]–a∙s[i–1]
def pre_process(a):
def _decorator(func):
def _wrapper(*args, **kwargs):
arg = [args[i]+1 for i in range(len(args))] # s[i] = s[i]–a∙s[i–1]
return func(arg)
return _wrapper
return _decorator
@pre_process(a=0.93)
def plot_signal(s):
for sample in s:
print(sample)
plot_signal(s)
В строке 11 (arg = [args[i]+1...) возникает ошибка:"can only concatenate list (not "int") to list"