Hacker News new | past | comments | ask | show | jobs | submit login

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: