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

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Thu Nov 20 23:12:50 EST 2008


On Wed, 19 Nov 2008 11:20:05 -0500, Terry Reedy wrote:

>> It is useful and convenient to have "null values" like None, but it
>> isn't useful to say that None is not a value.
> 
> I never said that.  

But you've been defending the views of somebody who did. If you're going 
to play Devil's Advocate for views you don't believe (and I've been known 
to do the same myself), make it clear that this is what you're doing -- 
or at least don't take criticisms of those views as attacks against you.


> I said that it has no attributes (other than
> __class__) and no private data.  In other words, no content, no state.
> It is an empty object, just like objects()s, and similar in that to
> empty collections.

Yes, but the lack of state is itself a state, just like 0 is still an int 
despite being the lack of quantity. That's the point I'm trying to make: 
having no state is itself a state, just like the empty set is a set. 
Because of its particular state ("empty state") None has behaviour 
different from most other objects, in the same way that 0 behaves 
differently from other ints (e.g. a*x==x for all values of a only if 
x==0). But singling None out as "not a value" is just like singling 0 as 
as not an int.


-- 
Steven



More information about the Python-list mailing list