Python23: cannot inherit from bool?
andrew.thompson at ashecastle.com
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.
From: python-list-admin at python.org [mailto:python-list-admin at python.org]
On Behalf Of Robin Becker
Sent: 15 January 2003 13:28
To: python-list at python.org
Subject: Re: Python23: cannot inherit from bool?
In article <b03kr8$lbili$1 at ID-71831.news.dfncis.de>, James Kew
<james.kew at btinternet.com> writes
>> 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
More information about the Python-list