python | February 08, 2020
def name_decorator(name):
def hello(func):
def third():
return func() + name
return third
return hello
@name_decorator(name='')
def greeting():
return "Hello, "
#TypeError: 'str' object is not callable
def name_decorator(name):
def hello(func):
#def third():
return func() + name
#return third
return hello