Passing by value instead of reference
Michael Hudson
mwh21 at cam.ac.uk
Wed May 10 12:57:32 EDT 2000
"Jeff Massung" <jmassung at magpiesystems.com> writes:
> >>> z=5
> >>> id(z)
> 6532920
> >>> def test(x):
> print id(x)
> >>> test(z)
> 6532920
>
> Is there a way to pass the value of z and not the address? Thanks.
Then what would you expect your "test" function to do?
Cheers,
M.
--
SCSI is not magic. There are fundamental technical reasons why it
is necessary to sacrifice a young goat to your SCSI chain now and
then. -- Anon.
More information about the Python-list
mailing list