[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: isinstance(False, int

Rolando Espinoza La Fuente

3/5/2010 6:28:00 PM

On Fri, Mar 5, 2010 at 2:00 PM, Steve Holden <steve@holdenweb.com> wrote:
[...]
>
> Just a brainfart from the BDFL - he decided (around 2.2.3, IIRC) that it
> would be a good ideal for Booleans to be a subclass of integers.
>

I would never figured out

>>> bool.__bases__
(<type 'int'>,)

Doesn't have side effects not knowing that False/True are ints?

Regards,

Rolando