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/042573.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?François Pinard pinard at iro.umontreal.ca
Sun Feb 15 22:19:53 EST 2004
[Greg Ewing]
> Martin:

> > So bool guarantees:  ... b)
> > there are only two different objects representing these values.

> Why is this property so important?

When I read the quote from Guido speaking about code invariants, I
presumed that the internal code for `bool' uses things like:

   if SUCH is True:
      ...
   else:
      ...

relying on the facts that 1) if SUCH is true, than SUCH _is_ True, and
also, 2) that SUCH not being True means that it is necessarily False.
These surely allow for a simple and efficient `bool'.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard

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