Official definition of call-by-value (Re: Finding the instance reference...)

Fredrik Lundh fredrik at pythonware.com
Wed Nov 12 16:05:33 EST 2008


greg wrote:

>> It's not only misleading, it's also a seriously flawed reading of the 
>> original text - the Algol 60 report explicitly talks about assignment 
>> of *values*.
> 
> Do you agree that an expression in Python has a value?
 >
> Do you agree that it makes sense to talk about assigning
> that value to something?

Python's definition of the word "value" can be found in the language 
reference:

http://docs.python.org/reference/datamodel.html#objects-values-and-types

Using that definition, a Python expression yields an object, not an 
object value.

For comparison, here's Algol's definition of the word "value":

"A value is an ordered set of numbers (special case: a single number), 
an ordered set of logical values (special case: a single logical value), 
or a label."

It should be obvious to anyone that Python is not Algol.

 > If so, what is there to stop us from applying the Algol
 > definition to Python?

The fact that we're talking about Python.  Python is not Algol.

</F>




More information about the Python-list mailing list