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/042545.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?Tim Peters tim.one at comcast.net
Thu Feb 12 16:09:28 EST 2004
See
    http://mail.python.org/pipermail/python-dev/2002-March/020822.html

    [Guido]
    I thought about this last night, and realized that you shouldn't be
    allowed to subclass bool at all!  A subclass would only be useful
    when it has instances, but the mere existance of an instance of a
    subclass of bool would break the invariant that True and False are
    the only instances of bool!  (An instance of a subclass of C is also
    an instance of C.)  I think it's important not to provide a backdoor
    to create additional bool instances, so I think bool should not be
    subclassable.

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