Question about Pass-by-object-reference?

Terry Reedy tjreedy at udel.edu
Tue Jul 22 20:27:15 EDT 2014


When you call a function, Python binds function parameter names to 
argument objects in the function's local namespace, the same as in name 
assignments. Given

def f(a, b): pass

a call f(1, 'x') starts by executing

a, b = 1, 'x'

in the local namespace.  Nothing is being 'passed'.

-- 
Terry Jan Reedy




More information about the Python-list mailing list