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

Jeremy Hylton jeremy@zope.com
Thu, 25 Apr 2002 23:43:17 -0400


"GvR" == Guido van Rossum <guido@python.org> writes:

I can help with the compiler changes.

GvR> Great! (Though I was hoping someone from outside PythonLabs -- GvR> we're already too busy, and you in particular.)

If someone else wants to do it, I'll be happy to help.

I think it's a small project. We've got a new node type in the grammar -- None -- and we'll need a new opcode -- LOAD_NONE. The compiler just needs to generate a LOAD_NONE for every None node.

Does the parser prevent assignment to None? Or does the compiler need to check for the use of None in an assignment?

Jeremy