Is 'everything' a refrence or isn't it?

Donn Cave donn at drizzle.com
Sun Jan 15 13:54:20 EST 2006


Quoth "Fredrik Lundh" <fredrik at pythonware.com>:
| Steven D'Aprano wrote:
|
| > I'm sick of arguing about object, let's use a different example:
| >
| > >>> id(None)
| > 135289128
| > >>> type(None)
| > <type 'NoneType'>
| >
| > What's the value of None? Would you say "it has no value" or "it's value
| > is None" or something else?
|
| it has no value (or if you prefer, the set of values is empty).

Dang, I would have said it does have a value.  For one thing, in

     if a:
         print 'more or less True'
     else:
         print 'evidently not'

None doesn't follow the default, so it seems like "if" has discovered
some sort of value in there.

(But of course in any case, whether this is a value or not a value, the
value of the question is certainly in question.)

	Donn Cave, donn at drizzle.com



More information about the Python-list mailing list