isinstance(False, int)

Rolando Espinoza La Fuente darkrho at gmail.com
Fri Mar 5 13:27:48 EST 2010


On Fri, Mar 5, 2010 at 2:00 PM, Steve Holden <steve at 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


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /