Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a_stand_alone_function = my_shiny_new_decorator(a_stand_alone_function)
- a_stand_alone_function()
- #outputs:
- #Before the function runs
- #I am a stand alone function, don't you dare modify me
- #After the function runs
- # That’s EXACTLY what decorators do!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement