[Python-Dev] Boolean transition (original) (raw)

Tim Peters tim.one@comcast.net
Sun, 10 Mar 2002 20:19:00 -0500


[Samuele Pedroni]

... If I was about to separate bool from int (but for that I would need to be conviced about the errors I'm going to avoid with that), both int(False) and int(True) would fail - I mean - their result is as much intuitive as summing booleans directly . ... So I would introduce a specific built-in for that conversion (maybe chi() ).

That's the function operator.truth() serves -- or would have, if Guido hadn't broken it .