ACCEPTED: PEP 285

Guido van Rossum guido at python.org
Thu Apr 4 09:22:26 EST 2002


Paul Rubin wrote:
> 
> I think there will need to be a format code for truth values:
> 
>   ("%b" % True) => "True"

There's no need.  "%s" % True already yields 'True'.  if you want
coercion to bool, use "%s" % bool(b).

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-list mailing list