A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-February/042590.html below:

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

[Python-Dev] bool does not want to be subclassed? [Python-Dev] bool does not want to be subclassed?Guido van Rossum guido at python.org
Mon Feb 16 20:07:58 EST 2004
> Martin:
> 
> > Of these, there are two categories of objects:
> > - values:
> > - identity objects:
> > 
> > Values fall into two further categories:
> > - immutable values:
> > - mutable values:

[Greg]
> 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.

Actually, think the very definition of a mutable object may be one
whose equality can change over its lifetime.

As you pointed out, we should talk about (im)mutable objects, not
types, because (e.g.) tuples can contain lists.

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4