Re: Lisp history: IF, etc.

Liste des GroupesRevenir à cl lisp 
Sujet : Re: Lisp history: IF, etc.
De : no.email (at) *nospam* nospam.invalid (Paul Rubin)
Groupes : comp.lang.lisp
Date : 04. Apr 2024, 09:10:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <87sf0138nk.fsf@nightsong.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Axel Reichert <mail@axel-reichert.de> writes:
I am also surprised that True "equals" to 1 in this context and False
to 0 (rather not C-like).

There is a hacky thing with that, because the boolean type wasn't added
to Python til fairly late in its history.

Could you please give some pointers about the rationale (or further
documentation) here?

For a long time the Python developers refused to have a conditional
expression in the language, preferring the kludgy

    a = y and x/y

or other bug-prone hacks of that sort.  The danger was that all sorts of
null values such as 0, 0.0, None, the empty list, all are treated as
false for boolean expression purposes, so you could end up getting
fooled by one of those cases.  The hack with lambdas was a way to
express the actually desired behaviour though I didn't realize anyone
used it in practice.

Later, the Python interpreter itself fell fictim to such a bug, and
that's when the conditional expression finally got accepted.

I use Python all the time and it is very pleasant, but very often its
decisions are initially driven by what is convenient to implement in
CPython (the reference interpreter, written in C).  So various kludgy
practices develop that often must be cleaned up sometime later.

Date Sujet#  Auteur
2 Apr 24 * Lisp history: IF, etc.56Alan Bawden
2 Apr 24 +- Re: Lisp history: IF, etc.1Kaz Kylheku
3 Apr 24 +- Re: Lisp history: IF, etc.1Gijs Hillenius
3 Apr 24 +- Re: Lisp history: IF, etc.1Gijs Hillenius
3 Apr 24 +* Re: Lisp history: IF, etc.49Madhu
3 Apr 24 i`* Re: Lisp history: IF, etc.48Alan Bawden
3 Apr 24 i +* Re: Lisp history: IF, etc.35Paul Rubin
3 Apr 24 i i`* Re: Lisp history: IF, etc.34Alan Bawden
4 Apr 24 i i +* Re: Lisp history: IF, etc.32Paul Rubin
4 Apr 24 i i i+* Re: Lisp history: IF, etc.5Lawrence D'Oliveiro
4 Apr 24 i i ii+* Re: Lisp history: IF, etc.3Axel Reichert
4 Apr 24 i i iii+- Re: Lisp history: IF, etc.1Lawrence D'Oliveiro
4 Apr 24 i i iii`- Re: Lisp history: IF, etc.1Paul Rubin
4 Apr 24 i i ii`- Re: Lisp history: IF, etc.1Kaz Kylheku
4 Apr 24 i i i`* Re: Lisp history: IF, etc.26Alan Bawden
5 Apr 24 i i i `* Re: Lisp history: IF, etc.25Paul Rubin
5 Apr 24 i i i  `* Re: Lisp history: IF, etc.24Julieta Shem
5 Apr 24 i i i   +- Re: Lisp history: IF, etc.1Julieta Shem
6 Apr 24 i i i   +- Re: Lisp history: IF, etc.1Lawrence D'Oliveiro
15 Apr 24 i i i   `* Re: Lisp history: IF, etc.21Paul Rubin
16 Apr 24 i i i    `* Re: Lisp history: IF, etc.20Jeff Barnett
16 Apr 24 i i i     +* Re: Lisp history: IF, etc.2Lawrence D'Oliveiro
16 Apr 24 i i i     i`- Re: Lisp history: IF, etc.1Jeff Barnett
16 Apr 24 i i i     +* Re: Lisp history: IF, etc.16Paul Rubin
16 Apr 24 i i i     i`* Re: Lisp history: IF, etc.15Jeff Barnett
16 Apr 24 i i i     i `* Re: Lisp history: IF, etc.14Lawrence D'Oliveiro
16 Apr 24 i i i     i  +* Re: Lisp history: IF, etc.12Paul Rubin
17 Apr 24 i i i     i  i`* Re: Lisp history: IF, etc.11Lawrence D'Oliveiro
17 Apr 24 i i i     i  i `* Re: Lisp history: IF, etc.10Paul Rubin
17 Apr 24 i i i     i  i  `* Re: Lisp history: IF, etc.9Jeff Barnett
17 Apr 24 i i i     i  i   `* Re: Lisp history: IF, etc.8Lawrence D'Oliveiro
17 Apr 24 i i i     i  i    `* Re: Lisp history: IF, etc.7Paul Rubin
17 Apr 24 i i i     i  i     +* Re: Lisp history: IF, etc.3Madhu
18 Apr 24 i i i     i  i     i`* Re: Lisp history: IF, etc.2Lawrence D'Oliveiro
18 Apr 24 i i i     i  i     i `- Re: Lisp history: IF, etc.1Paul Rubin
17 Apr 24 i i i     i  i     `* Re: Lisp history: IF, etc.3Ben Bacarisse
18 Apr 24 i i i     i  i      `* Re: Lisp history: IF, etc.2Lawrence D'Oliveiro
18 Apr 24 i i i     i  i       `- Re: Lisp history: IF, etc.1Stefan Monnier
17 Apr 24 i i i     i  `- Re: Lisp history: IF, etc.1Jeff Barnett
17 Apr 24 i i i     `- Re: Lisp history: IF, etc.1Stefan Ram
4 Apr 24 i i `- Re: Lisp history: IF, etc.1Ben Bacarisse
3 Apr 24 i +* Re: Lisp history: IF, etc.7Kaz Kylheku
4 Apr 24 i i+* Re: Lisp history: IF, etc.5Alan Bawden
4 Apr 24 i ii+* Re: Lisp history: IF, etc.3Kaz Kylheku
4 Apr 24 i iii`* Re: Lisp history: IF, etc.2Kaz Kylheku
4 Apr 24 i iii `- on levels of disappointment (Was: Re: Lisp history: IF, etc.)1Julieta Shem
4 Apr 24 i ii`- Re: Lisp history: IF, etc.1Julieta Shem
5 Apr 24 i i`- Re: Lisp history: IF, etc.1Spiros Bousbouras
4 Apr 24 i +* Re: Lisp history: IF, etc.3Lawrence D'Oliveiro
4 Apr 24 i i`* Re: Lisp history: IF, etc.2Alan Bawden
4 Apr 24 i i `- Re: Lisp history: IF, etc.1Kaz Kylheku
12 Apr 24 i `* Re: Lisp history: IF, etc.2Alan Bawden
12 Apr 24 i  `- Re: Lisp history: IF, etc.1Lawrence D'Oliveiro
4 Apr 24 `* Re: Lisp history: IF, etc.3Kaz Kylheku
4 Apr 24  `* Re: Lisp history: IF, etc.2Alan Bawden
4 Apr 24   `- Re: Lisp history: IF, etc.1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal