Evaluation of Truth Curiosity

James Stroud jstroud at mbi.ucla.edu
Thu Sep 21 10:39:42 CEST 2006

Hello All,

I'm curious, in

py> 0 | (1 == 1)
py> False | (1 == 1)

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?


More information about the Python-list mailing list