Advertisement
here2share

# b_decorator.py

Dec 7th, 2019
455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. # b_decorator.py
  2.  
  3. def world(func):
  4.     def wrapper():
  5.         return func() + " World!"
  6.  
  7.     return wrapper
  8.  
  9. @world
  10. def hello():
  11.     return "Hello"
  12.  
  13. print(hello())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement