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

Donn Cave donn at
Sun Jan 15 19:54:20 CET 2006

Quoth "Fredrik Lundh" <fredrik at>:
| 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'
         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

More information about the Python-list mailing list