[Python-Dev] Making None a keyword

Tim Peters tim.one@comcast.net
Fri, 26 Apr 2002 11:31:39 -0400


[Guido]
> ...
> It needs to add 'None' as an alternative to all other places where
> currently NAME occurs.

Fudge.  None makes no sense anywhere in, e.g.,

dotted_name: NAME ('.' NAME)*

or

    global_stmt: 'global' NAME (',' NAME)*

but I suppose it has to be allowed for in 2.3 anyway else an existing

    import None.None.None as None

would yield a SyntaxError instead of a warning.

Note too that we can't change the generated code at all for 2.3 unless under
the control of a new future statement, else existing None-abusing code could
break.