On Jul 11, 3:37 am, Rob Wolfe <[EMAIL PROTECTED]> wrote: > > But `bools` are usefull in some contexts. Consider this: > > >>> 1 == 1 > True > >>> cmp(1, 1) > 0 > >>> 1 == 2 > False > >>> cmp(1, 2) > > -1 > > At first look you can see that `cmp` does not return boolean value > what not for all newbies is so obvious.
Excellent point! And as long as we have them I agree with Alan that the boolean data type should implement real boolean algebra with respect to +, *, and ~, for example supporting operator precedence appropriately (versus using and, or, not) and also correctly implementing DeMorgan's laws and other property's of boolean algebra ~(a*b) == ~a + ~b etcetera. 1+True is bad practice and should be an error. Anything else is false advertising (and the java community has the patent on that methodology :c) ). -- Aaron Watters === Why does a giraffe have such a long neck? Because its head is so far from its body! -- http://mail.python.org/mailman/listinfo/python-list