Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def mydec(func, param):
- def wrapped_function(*arg, **kwarg):
- func(*arg, **kwarg)
- return wrapped_function
- @mydec('Hello, world')
- def echo(string):
- print(string)
- echo('Compu')
- '''Output:
- Hello, world
- Compu'''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement