Sujet : Re: Command Languages Versus Programming Languages
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.miscDate : 04. Apr 2024, 12:20:48
Autres entêtes
Organisation : Stefan Ram
Message-ID : <if-20240404121825@ram.dialup.fu-berlin.de>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Richard Kettlewell <
invalid@invalid.invalid> wrote or quoted:
I’ve been familiar with both for years and I think the Python version is
awful; in particular the ordering is a bizarre choice.
The way this syntax is set up is apparently credited to
this guy named Guido, according to this PEP 308 thing.
Now, in English, we usually throw a comma in there when an
"if" clause comes first, 'cause it kinda throws off the normal
flow, you know? So that shows the default position for "if"
is actually after the main part. - Maybe Guido was making that
same kind of comparison to English, and that's why he decided
the post-"if" format works better.
In my example here, there were a whole bunch of these operators
all nested inside each other without any parentheses. And let
me tell you, when you start getting into that kind of nested
stuff with not parentheses in view, even the "?:" notation
can start looking pretty darn mysterious to some folks.