[Python-Dev] Making None a keyword (original) (raw)
Fred L. Drake, Jr. fdrake@acm.org
Fri, 26 Apr 2002 01:16:38 -0400
- Previous message: [Python-Dev] Making None a keyword
- Next message: [Python-Dev] Making None a keyword
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Jeremy Hylton writes:
Does the parser prevent assignment to None? Or does the compiler need to check for the use of None in an assignment?
Inside functions, you don't even need that. You just need to use LOAD_CONST (or whatever its called now), since None is entry 0 in the constants table, used by the implied "return None" when control drops off the end. Doing this in function buys most of the performance.
-Fred
-- Fred L. Drake, Jr. PythonLabs at Zope Corporation
- Previous message: [Python-Dev] Making None a keyword
- Next message: [Python-Dev] Making None a keyword
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]