PEP 285: Adding a bool type

phil hunt philh at comuno.freeserve.co.uk
Sat Mar 30 17:46:00 EST 2002


On Sat, 30 Mar 2002 08:38:00 -0500, Guido van Rossum <guido at python.org> wrote:
>
>Tim must be missing something.  The obvious way to turn a bool b into
>an int is int(b).

Will this work on old versions of python? I've just checked that it 
works on 2.0, but what about 1.5.1 or 1.6?

I'd guess (b*1) would work on everything, however.


-- 
<"><"><"> Philip Hunt <philh at comuno.freeserve.co.uk> <"><"><">
"I would guess that he really believes whatever is politically 
advantageous for him to believe." 
                        -- Alison Brooks, referring to Michael
                              Portillo, on soc.history.what-if



More information about the Python-list mailing list