James Stroud wrote: > What is the logic of the former expression not evaluating to True (or > why the latter not 1?)? Is there some logic that necessitates the first > operand's dictating the result of the evaluation? Or is this an artefact > of the CPython implementation?
If I understand correctly, OR'ing an int and a bool (your first example) returns an int by coercing the bool to an int; and OR'ing two bools (your second example) returns a bool. Regards, Jordan -- http://mail.python.org/mailman/listinfo/python-list