def funcDec(func):
    localVariable = "I'm a local string"

def func2Return(*args):
    print('Calling localVariable from decorator ' + localVariable)
func(*args)
print('done with calling f1')
func2Return.attrib = localVariable
return func2Return

@funcDec
def f1(x, y):
    print(x + y)
print('f1.attrib:', f1.attrib)
f1(2, 3)
Can a decorated function access variables of the decorator