[Tutor] Question about python decorators

nathan tech nathan-tech at hotmail.com
Mon Jul 11 06:58:47 EDT 2022


As I understand it, decorators are usuallyed created as:
@object.event
Def function_to_be_executed():
Do_stuff

My question is, is there a way to create this after the function is created?
So:
Def function():
Print("this is interesting stuff")

@myobject.event=function

Thanks
Nathan




More information about the Tutor mailing list