TypeCast/FrBrGeorge
TypeCast/MVPakaGuru
n1#!/usr/bin/env python3n
2'''
3'''
4from functools import wraps1from functools import wraps
52
63
t7def cast(typ):t4def cast(out_type):
8    def _cast(fun):5    def decorator(f):
9        @wraps(fun)6        @wraps(f)
10        def _fun(*a, **k):7        def wr(*args, **kwargs):
11            res = fun(*a, **k)8            res = f(*args, **kwargs)
12            return typ(res)9            return out_type(res)
13        return _fun10        return wr
14    return _cast11    return decorator
1512
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op