A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-March/020799.html below:

[Python-Dev] For review: PEP 285: Adding a bool type

[Python-Dev] For review: PEP 285: Adding a bool type [Python-Dev] For review: PEP 285: Adding a bool typeDavid Abrahams David Abrahams" <david.abrahams@rcn.com
Fri, 8 Mar 2002 15:31:35 -0500
----- Original Message -----
From: "David Ascher" <DavidA@ActiveState.com>

> I wonder if the str()/repr() distinction or % formatting codes could
> help break the logjam.  Probably not.
>
> I'm still not convinced that the disease is worth the cure, but I'm
> open-minded =).

The big reason I was excited about bool in C++ when we got it was that I
knew I'd be able to do this, given b1,b2 of type bool:

    if (b1 == b2) ...

And there would be no chance of getting the wrong result because b1 and
b2 were different ways to spell "true" (i.e. b1 == 1, b2 == 42). I guess
the python analogy would be:

if bool(x[y]) == bool(z):
    ...

or something like that.

FWIW,
Dave





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