[Python-Dev] bool does not want to be subclassed?

Greg Ewing greg at cosc.canterbury.ac.nz
Mon Feb 16 18:38:29 EST 2004


> Why is it important *not* to have this property?

Probably not greatly important, it just seems to me that
there ought to be a fairly strong reason for taking the
somewhat drastic step of making something non-subclassable.

> it helps the implementation a bit

Only a tiny bit, surely? Anything which accepts a boolean
has to be prepared to deal with any type of object anyway.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list