TypeCast/bucholga
TypeCast/Aleksyav
f1from functools import wrapsf1from functools import wraps
22
33
n4def cast(p_type):n4def cast(t):
5    def reload(f):5    def decorator(f):
6        @wraps(f)6        @wraps(f)
t7        def casting(*args, **kw):t7        def newfun(*args, **kwargs):
8            return p_type(f(*args, *kw))8            return t(f(*args, **kwargs))
9        return casting9        return newfun
10    return reload10    return decorator
1111
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op