Passing by value instead of reference
mwh21 at cam.ac.uk
Wed May 10 21:00:01 CEST 2000
"Jeff Massung" <jmassung at magpiesystems.com> writes:
> >Then what would you expect your "test" function to do?
> Just print a different address. If test was:
> def text(x):
> print z
> I would want this to print the original value of z (5), not 1.
It will. I don't think you understand assigment yet...
112. Computer Science is embarrassed by the computer.
-- Alan Perlis, http://www.cs.yale.edu/~perlis-alan/quotes.html
More information about the Python-list