"Raymond Hettinger" <[EMAIL PROTECTED]> writes: > It is unlike to before Py3.0. Making them constants would break the > reams of compatability code: True, False = (1==1), (1!=1).
I don't see why that particular statement needs to fail. The interpreter could permit assigning True=True or False=False without raising an error. Then True and False wouldn't really be constants, but they'd instead be variables whose value was always known to the compiler, which for optimization purposes is just as good. The compiler could alternatively do some simple dataflow analysis to make sure the values of True and False haven't been changed in a particular module, before doing that particular optimization. -- http://mail.python.org/mailman/listinfo/python-list