import functools
def log (func): def decorator(args,*kwargs): print('call begin') func() print('end call') return decorator @log def f(): print("Im being called") f()
Sign in to make a reply
Va-Va-Voom-BiBi
!/usr/bin/env python3
-- coding: utf-8 --
import functools
def log (func): def decorator(args,*kwargs): print('call begin') func() print('end call') return decorator @log def f(): print("Im being called") f()