None & Ellipsis

Martin von Loewis loewis at informatik.hu-berlin.de
Mon Feb 21 09:17:44 EST 2000


Gerrit Holl <gerrit.holl at pobox.com> writes:

> why aren't None and Ellipsis keywords?

They are values, and that would be a precedent of keywords in Python
indicating values. The strings and numbers are, strictly speaking, not
'keywords', because they aren't even words.

To the user, it normally should make no difference. For the Python
implementation, it would enable slight optimizations, e.g. to enable
the famous 'ret None' bytecode instruction. It is very possible that
such optimizations are performed in future Python versions; so you can
treat None and Ellipsis today as if they were keywords.

Of course, following the Python style, they should be lowercase if
they were keywords.

Regards,
Martin



More information about the Python-list mailing list