Python23: cannot inherit from bool?

Andrew Thompson andrew.thompson at
Wed Jan 15 14:45:03 CET 2003

Inheriting from bool is a clever idea from Smalltalk.

Where true and false subclass the abstract type bool.

This then makes if,and,or,not all very natural to define.


-----Original Message-----
From: python-list-admin at [mailto:python-list-admin at]
On Behalf Of Robin Becker
Sent: 15 January 2003 13:28
To: python-list at
Subject: Re: Python23: cannot inherit from bool?

In article <b03kr8$lbili$1 at>, James Kew
<james.kew at> writes
>FrankS wrote:
>> It seems that 2.3 doesn't allow you to inherit from bool:
>I'm not qualified to comment on why it's not allowed, but out of 
>interest: why might you want to inherit from bool?
.... don't know the answer to that one, but is the non inheritance
property available to ordinary python if yes we could create leaf
Robin Becker

More information about the Python-list mailing list