[Python-Dev] Py3K: True and False builtin or keyword?

Peter Funk pf@artcom-gmbh.de
Thu, 23 Mar 2000 23:12:25 +0100 (MET)

Regarding the discussion about None becoming a keyword
in Py3K:  Recently the truth values True and False have been
mentioned.  Should they become builtin values --like None is now--
or should they become keywords?

Nevertheless: for the time being I came up with the following
weird idea:  If you put this in front of the main module of a Python app:

#!/usr/bin/env python
if __name__ == "__main__":
    import sys
    if sys.version[0] <= '1':
        __builtins__.True  = 1
        __builtins__.False = 0
    del sys
# --- continue with your app from here: ---
import foo, bar, ...

Now you can start to use False and True in any immported module 
as if they were already builtins.  Of course this is no surprise here
and Python is really fun, Peter.