Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

basic decorator example

def log_result(func):
  def inner():
    res = func()
    print(res)
    return res
Source by python.plainenglish.io #
 
PREVIOUS NEXT
Tagged: #basic #decorator
ADD COMMENT
Topic
Name
1+3 =