On Dec 15, 2008, at 12:53 PM, Simon King wrote:

> Dear Lars, dear Robert,
>
>> The explanation is hidden in a footnote in the tutorial. Please see
>> "Defining Functions" in "More Control Flow Tools" in the Python
>> Tutorial:http://docs.python.org/tutorial/controlflow.html#defining- 
>> functions
>
> That part of the documentation seems misleading to me and ought to be
> changed, IMHO.

I agree, a bug report should be filed with Python.

> I mean, it is argued that any call-by-reference is in fact a call-by-
> value because an object reference *is* a value, after all...
> ("arguments are passed using call by value (where the value is always
> an object reference, not the value of the object).")
>
> Is there a better way to hide a pitfall :-?

I think the point they're trying to make is that if I do

foo(a)

then the object a may be mutated, but no matter what foo does it will  
never be able to point the caller's value of a to a different object.

- Robert


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to