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

Greg Ewing greg at cosc.canterbury.ac.nz
Mon Feb 16 19:14:43 EST 2004


> Of these, there are two categories of objects:
> - values:
> - identity objects:
> Values fall into two further categories:
> - immutable values:
> - mutable values:

All these rules can be boiled down to:

  * Objects which compare equal should hash equal.
  * The notion of equality should not change over the
    lifetime of the object.

There's no need to mention mutability at all.

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