On Wed, May 4, 2011 at 12:40 PM, sturlamolden <stu...@molden.no> wrote: > > On May 4, 5:40 pm, Michael Torrie <torr...@gmail.com> wrote: > > > Which is exactly what the code showed. The first one isn't a mistake. > > You just read it wrong. > > No, I read "call-by-value" but it does not make a copy. Call-by-value > dictates a deep copy or copy-on-write. Python does neither. Python > pass a handle to the object, not a handle to a copy of the object. If > you want to see call-by-value in practice, take a look at MATLAB, > SciLab or Octave; or consider what C++ copy constructors do in > function calls with value types.
You missed a word in the sentence. "If you can see this, you DON'T have call-by-value" -- http://mail.python.org/mailman/listinfo/python-list