Loop until condition is true

Michael Hoffman cam.ac.uk at mh391.invalid
Thu Jun 23 12:36:35 EDT 2005


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.
-- 
Michael Hoffman



More information about the Python-list mailing list