[Tutor] Function Return Values (or References)
Steven D'Aprano
steve at pearwood.info
Mon Jun 24 15:39:47 CEST 2013
On 24/06/13 18:12, John Steedman wrote:
> Hi Tutors,
>
> I'm confused by the following possible contradiction. Would someone please
> explain or point me to the right docs.
[snip confusion about parameter passing and Python's object model]
> By FACT 1 x should be a reference parameter...?
> By Fact 2 x would seem to be a copy...?
Function arguments in Python are *neither* passed by reference nor passed by value (copied).
Here's a post I made some years ago going into long detail about it. I hope this is helpful for you.
http://mail.python.org/pipermail/tutor/2010-December/080505.html
--
Steven
More information about the Tutor
mailing list