Michael Hoffman <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > >> Making None a constant broke existing code (and I just saw old code >> that assigned to None). Are True and False that much more common as >> variable names than None? > > Yes. In fact, I count at least 4 different modules in the Python 2.4 > standard library that assign to True or False, mainly as a > compatibility measure for the days before they were built-ins. If you > try assigning None, CPython will refuse to compile the module, even if > the code where None is assigned is unreachable. > > If there was ever a good reason to assign to None, I don't know it.
For the record, the code I just saw did something like this: (var1, var2, None, None) = make_tuple(args) Pretty clearly, they were just throwing away some unused values. Who knows what it did to None... <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list