Official definition of call-by-value (Re: Finding the instance reference...)
aahz at pythoncraft.com
Wed Nov 12 03:22:02 CET 2008
In article <6nul1qF100urU1 at mid.individual.net>,
greg <greg at cosc.canterbury.ac.nz> wrote:
>Here is the definition of call-by-value from the
>"Revised Report on the Algorithmic Language Algol 60"
>220.127.116.11. Value assignment (call by value). All formal parameters quoted in the
>value part of the procedure declaration heading are assigned the values (cf.
>section 2.8. Values and types) of the corresponding actual parameters, these
>assignments being considers as being performed explicitly before entering the
>procedure body. The effect is as though an additional block embracing the
>procedure body were created in which these assignments were made to variables
>local to this fictitious block with types as given in the corresponding
>specifications (cf. section 5.4.5).
>There you have it -- call by value is offially defined in
>terms of assignment. There is no mention in there of copying.
>So it's perfectly correct to use it in relation to Python.
Except, of course, for the fact that it is generally misleading.
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"It is easier to optimize correct code than to correct optimized code."
More information about the Python-list