Миронов Денис, 519/2 группа FixFloat 12632
Дарья Дроздова, 522 группа FixFloat 12851
f1def fix(n):f1def fix(n):
22
n3    def decorator(func):n3    def decorator(fun):
44
n5        def _decoracor(*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 = {}12            newkwargs = {}
13            for (k, v) in kwargs.items():13            for (keyitem) in kwargs.items():
14                if type(v) == float:14                if type(item) == float:
15                    new_kwargs[k] = round(v, n)15                    newkwargs[key] = round(item, n)
16                else:16                else:
n17                    new_kwargs[k] = vn17                    newkwargs[key] = item
18            res = func(*tuple(new_args), **new_kwargs)18            result = fun(*newargs, **newkwargs)
19            if type(res) == float:19            if type(result) == float:
20                return round(res, n)20                return round(result, n)
21            else:21            else:
t22                return rest22                return result
23        return _decoracor23        return newfun
24    return decorator24    return decorator
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op