You essentially changed the definition of "value" to mean what is just called "name" in Python.
Names refer to objects. Names are introduced by name binding operations such as `=`, `import`, `def`.
def f(a, b): # a, b - local variables
a = [1] # doesn't change x list; a refers to the new list hence forth
b.append(2) # change y list; b refers to the same list as y
x, y = [], []
f(x, y)
print x, y # [], [2]
Note: a "win" doesn't change the truth. It just means that nobody cared enough to participate further in the hostile discussion.
Comments
You have it right in that it's call by value. But HN already had a fight over that a while ago: http://news.ycombinator.com/item?id=4783229 (That I apparently won. :P)
You essentially changed the definition of "value" to mean what is just called "name" in Python.
Names refer to objects. Names are introduced by name binding operations such as `=`, `import`, `def`.
Note: a "win" doesn't change the truth. It just means that nobody cared enough to participate further in the hostile discussion.I see, people were mistaking the different nature of values in C and Python for a difference in calling semantics.