[Python-3000] Status of True, False, bool type

Talin talin at acm.org
Mon Jan 1 22:17:34 CET 2007


Josiah Carlson wrote:
>     >>> 1 is not True
>     True
>     >>> 1 == True
>     True
>     >>> isinstance(True, int)
>     True
> 

This makes perfect sense to me. 'True' is implicitly convertible to, but 
not identical to, 1.

(I was about to type a long-winded explanation of why this makes sense 
from a historical and philosophical perspective, but I think I'll just 
skip it for now.)

-- Talin


More information about the Python-3000 mailing list