X
Xavier
Greetings,
I was wondering if there was a way to get a list of all the variables which
were executed/created/modified within a function?
Here is a simple example that comes to my mind:
def getVars(func):
...
...
...
def modVar(arg, arg2):
Var1 = arg
Var2 = arg2
Var3 = arg+arg2
return Var3
def main():
print getVars(modVar('test', 'test2'))
# end
naturally, "Var1", "Var2" and "Var3" should be printed to the user. Any
idea?
-- Xavier
oderint dum metuant
I was wondering if there was a way to get a list of all the variables which
were executed/created/modified within a function?
Here is a simple example that comes to my mind:
def getVars(func):
...
...
...
def modVar(arg, arg2):
Var1 = arg
Var2 = arg2
Var3 = arg+arg2
return Var3
def main():
print getVars(modVar('test', 'test2'))
# end
naturally, "Var1", "Var2" and "Var3" should be printed to the user. Any
idea?
-- Xavier
oderint dum metuant