[Python-Dev] PEP 285: Adding a bool type

Fredrik Lundh fredrik@pythonware.com
Fri, 5 Apr 2002 10:07:23 +0200


Stuart Bishop wrote:

> No - I was benchmarking with the patch posted on Sourceforge (before
> PEP285 was checked into CVS), patched into a CVS snapshot taken at
> the same time.
>=20
>   Casting  to bool using (x and True) or (x or False)  :  1.61
>   Casting to bool using (bool)  :  2.68
>   Flow control on explicit True  :  1.42
>   Flow control on explicit 1  :  0.99
>   Flow control on variable bound to True  :  1.02
>   Flow control on variable bound to 1  :  0.99

time to make keywords out of True, False (and None)?

</F>