TypeCast/Andrei_Romanov_618
TypeCast/aartur
f1from functools import wrapsf1from functools import wraps
22
33
n4def cast(tps):n4def cast(t):
5    def decor(f):5    def decorator(f):
6        @wraps(f)6        @wraps(f)
n7        def newfun(*args):n7        def new_f(*args):
8            res = f(*args)8            res = f(*args)
t9            return tps(res)t9            return t(res)
10        return newfun10        return new_f
11    return decor11    return decorator
1212
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op