why cannot assign to function call

Terry Reedy tjreedy at udel.edu
Mon Dec 29 20:25:27 CET 2008


John Machin wrote:
> On Dec 29, 5:01 pm, scsoce <scs... at gmail.com> wrote:
>> I have a function return a reference,
> 
> Stop right there. You don't have (and can't have, in Python) a
> function which returns a reference that acts like a pointer in C or C+
> +. Please tell us what manual, tutorial, book, blog or Usenet posting
> gave you that idea,

Perhaps the ones claiming that Python is 'call by reference' and hence, 
by implication, at least, 'return by reference'.

> and we'll get the SWAT team sent out straight away.

I and others have posted many times that such a viewpoints leads to 
confusion, such as in this post.

tjr




More information about the Python-list mailing list