In message <4ca96440$0$1674$742ec...@news.sonic.net>, John Nagle wrote:
> 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. What’s the alternative? Java’s definition of “bool” is crap. The Pascal/Ada approach was to introduce the general concept of “enumerated types”, which were a subclass of “discrete types” (including integers and subranges thereof). Boolean was just a built-in enumerated type. What’s a language like Python, which has no enumerated types, to do? -- http://mail.python.org/mailman/listinfo/python-list