Terry Reedy wrote: > On 7/30/2011 12:39 PM, bruno.desthuilli...@gmail.com wrote: >> On 28 juil, 17:39, Ethan Furman<et...@stoneleaf.us> wrote: >>> >>> --> bool(0) is bool(0) >>> True > >> This test is not reliable > > It is in the sense that it will always work -- because False/True are > doubletone constants and so documented.
Surely that should be doubleton :) 2.2: True and False released as names for 1 and 0; bool was a built-in function, but not a type. 2.3: bool promoted to a type; True and False actual bools. The documentation claims that there's only one instance of each. I'm sure that I remember a short period during which Python had bools, but didn't guarantee that there would only be one instance of True and one of False, but I'm damned if I can find any evidence of this. Am I confabulating? -- Steven -- http://mail.python.org/mailman/listinfo/python-list