Thursday, August 27, 2020

Decorators source code in python | What is decorators in python

 def dec1(func1):

    print("Muhammad Ashfaq is a good programmer")
func1()
print("This is Eaglesoft")
return 0
@dec1
def ashfaq():
print("Who is Ashfaq?")
#Another method that is
# alernative of @dec1
#val=dec1(ashfaq)
#print(val)

No comments:

Post a Comment