[Python-Dev] Making None a keyword (original) (raw)

Guido van Rossum guido@python.org
Fri, 26 Apr 2002 14:34:32 -0400


Ellipsis False None NotImplemented True

are the builtin singleton data constants, so I'm +1 on those.

I'll go along with True and False, since I expect that these will be frequently used (though still not as frequently as None).

Ellipsis is very rarely used (only by numeric code implementing multi-dimensional arrays), NotImplemented is used somewhat more but still pretty esoteric. So I'm -1 on those.

Otherwise, you might as well start making all built-in functions keywords -- that would probably buy you more, too. E.g. if range were a keyword, the compiler could implement "for i in range(n)" without materializing the whole list at once. But I'm not proposing that; I think there's a better way to get the same effect without making everything a keyword.

I just think that None is important enough to become a keyword.

--Guido van Rossum (home page: http://www.python.org/~guido/)