Professional Documents
Culture Documents
Python Apln PGMNG Hands On 3
Python Apln PGMNG Hands On 3
def log(func):
def inner(*args, **kwdargs):
STDOUT= "Accessed the function -'{}' with arguments {}
{}".format(func.__name__,args,kwdargs)
return STDOUT
return inner
def greet(msg):
'Greeting Message : ' + msg
greet = log(greet)
2)Decorator 2:
3)
m
#Define and implement bold_tag
er as
def bold_tag(func):
co
def inner(*args, **kwdargs):
eH w
return '<b>'+func(*args, **kwdargs)+'</b>'
return inner
o.
def say(msg):
rs e
ou urc
return msg
say = bold_tag(say)
o
This study source was downloaded by 100000827046007 from CourseHero.com on 11-27-2021 07:52:58 GMT -06:00
https://www.coursehero.com/file/77656402/Python-apln-pgmng-hands-on-3txt/
Powered by TCPDF (www.tcpdf.org)