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

rurpy at yahoo.com rurpy at yahoo.com
Tue Nov 18 18:37:19 CET 2008


On Nov 17, 7:35 pm, Craig Allen <callen... at gmail.com> wrote:
>> >> * Do all objects have values? (Ignore the Python
>> >>  docs if necessary.)
>>
>> > If one allows null values, I am current thinking yes.
>>
>> I don't see a difference between a "null value"
>> and not having a value.
>
> I think the difference is concrete... an uninitialized variable in C
> has no value, I'd say, because the value it will have is
> indeterminate, it will be whatever happens to be sitting at that
> location in memory, inconsistent.  If that variable is initialized to
> some value representing "none", like NULL, then it has a consistent
> value of "none".  There is no way to have an uninitialized variable in
> python, so they are always consistently set, so they always have
> values.

I wrote "I don't see a difference between a "null value"
and not having a value" in the specific context of "what
constitutes an object?" considering the Python Docs
definition of object as identity, type, and value.  It
was that "value" (the characteristic of an object that
is left after you have considered id and type), that I
was referring to.  I still see no difference between a
"null value" and "has no value" in that context.
Nothing (directly) to do with memory, variables, C,
parameter passing, None, etc.

I realize in hightsight that the word "value" is too strongly
overloaded with pre-existing semantics for many people to
accept it being redefined with a specific meaning in the
limited context of a description of Python objects.  And it
was also pretty dumb of me to raise the issue in a contentious
thread about values in parameter passing.  Live and learn....



More information about the Python-list mailing list