Numbers and truth values

Steven D'Aprano steve at REMOVE.THIS.cybersource.com.au
Sat Apr 28 20:36:43 EDT 2007


On Sat, 28 Apr 2007 11:35:36 -0700, John Nagle wrote:

>> Python forbids very few things in comparison to other languages. The
>> attitude is "We're all adults here". Because Python is such a dynamic
>> language, it is often hard for the compiler to tell the difference between
>> something you are doing deliberately and a mistake.
> 
>      I'd have to consider that a bug.

[snip]

>      "True", "False", and "None" should be reserved words in Python.
> "None" already is.

What are you going to do about the code that pre-dates the introduction of
bools that defines

False = 0
True = not False

at the start of the module? The Python philosophy is to break existing
code as little as possible (at least until Python 3).



-- 
Steven




More information about the Python-list mailing list