ACCEPTED: PEP 285

logistix logstx at bellatlantic.net
Thu Apr 4 00:41:36 EST 2002


Both repr() and str() will return "True" or "False", so:

>>> "1 < 2 is %s" % (1 < 2)
1 < 2 is False

should be all you need.
Unless you want a non-bool to throw an error, but I don't see why you would.

--
-

"Paul Rubin" <phr-n2002a at nightsong.com> wrote in message
news:7xy9g4nk9w.fsf at ruckus.brouhaha.com...
> I think there will need to be a format code for truth values:
>
>   ("%b" % True) => "True"
>
> etc.





More information about the Python-list mailing list