Python23: cannot inherit from bool?

Michael Hudson mwh at python.net
Wed Jan 15 12:53:58 EST 2003


"Andrew Thompson" <andrew.thompson at ashecastle.com> writes:

> Inheriting from bool is a clever idea from Smalltalk.

... which is not Python

> Where true and false subclass the abstract type bool.
> 
> This then makes if,and,or,not all very natural to define.

However, in Python those things are already defined by the language...
I can appreciate the purity viewpoint, but it doesn't really apply
here.

Cheers,
M.

-- 
  Gevalia is undrinkable low-octane see-through only slightly
  roasted bilge water. Compared to .us coffee it is quite
  drinkable.                                      -- Måns Nilsson, asr




More information about the Python-list mailing list