On 10/1/2010 10:19 PM, Paul Rubin wrote:
Steven D'Aprano<st...@remove-this-cybersource.com.au> writes:
Incorrect. bools *are* ints in Python, beyond any doubt.
Python 2.6.2 (r262:71600, Jun 4 2010, 18:28:58)
>>> type(3)==type(True)
False
Yes, "bool" is a subtype of "int" in Python. This was
because the original design of Python didn't have "bool"
(a rather strange mistake for a language designed this late)
and the retrofit had to have some backwards compatibility.
That's why lame results such as "True + True" being 2.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list