var or inout parm?

mh at pixar.com mh at pixar.com
Sun Dec 7 03:54:46 EST 2008


How can I make a "var" parm, where the called function can modify
the value of the parameter in the caller?

def f(x):
    x = x + 1

n = 1
f(n)
# n should now be 2

Many TIA!!
Mark


-- 
Mark Harrison
Pixar Animation Studios



More information about the Python-list mailing list