Is there a way to access/modify/add variables to caller from a sub function

Ulrich Petri ulope at
Tue Jul 22 21:41:57 CEST 2003

"Anand" <anand_soliton at> schrieb im Newsbeitrag
news:3f5dc178.0307220913.62a7e92f at
> Is there a way to access/modify variables of a caller function from
> within a sub function call?
> Function A:   Calls subFuncB:
> var x           Add var xx in Function A's name space??
> var y
> var z

def funcB(foo):
    return foo*1, foo*2, foo*3

def funcA():
    f1,f2,f3 = funcB(1)

Ciao Ulrich

More information about the Python-list mailing list