Рогожин Денис Андреевич 525 FixFloat 12320
Дарья Дроздова, 522 группа FixFloat 12851
f1def fix(n):f1def fix(n):
22
n3    def dec(func):n3    def decorator(fun):
44
n5        def new_func(*args, **kwargs):n5        def newfun(*args, **kwargs):
6            new_args = []6            newargs = []
7            for arg in args:7            for item in args:
8                if type(arg) == float:8                if type(item) == float:
9                    new_args.append(round(arg, n))9                    newargs.append(round(item, n))
10                else:10                else:
n11                    new_args.append(arg)n11                    newargs.append(item)
12            new_kwargs = dict()12            newkwargs = {}
13            for (name, arg) in kwargs.items():13            for (key, item) in kwargs.items():
14                if type(arg) == float:14                if type(item) == float:
15                    new_kwargs[name] = round(arg, n)15                    newkwargs[key] = round(item, n)
16                else:16                else:
n17                    new_kwargs[name] = argn17                    newkwargs[key] = item
18            value = func(*new_args, **new_kwargs)18            result = fun(*newargs, **newkwargs)
19            if type(value) == float:19            if type(result) == float:
20                return round(value, n)20                return round(result, n)
21            else:21            else:
t22                return valuet22                return result
23        return new_func23        return newfun
24    return dec24    return decorator
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op