TypeCast/andreiduginpython21
TypeCast/alex.ust98
f1from functools import wrapsf1from functools import wraps
22
33
t4def cast(type):t4def cast(f):
5    @wraps(type)5    @wraps(f)
6    def decorator(a):6    def wrapper(func):
7        @wraps(a)7        @wraps(func)
8        def myfun(*args):8        def _w(*args):
9            return type(a(*args))9            return f(func(*args))
10        return myfun10        return _w
11    return decorator11    return wrapper
1212
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op