3 ms·
> > Add to that the brokenness of if...else > Could you elaborate on that? It's a very opinionated statement on my part. `if COND then TRUE-CASE else FALSE-CA
by aib 8y ago
> > Add to that the brokenness of if...else
> Could you elaborate on that?
It's a very opinionated statement on my part. `if COND then TRUE-CASE else FALSE-CASE` is the correct form to use, in my opinion. Python uses `TRUE-CASE if COND else FALSE-CASE`.
- hellofunk 8y agoConventional if statements in Python do use your preferred form of `if COND then TRUE-CASE else FALSE-CASE`. What you are talking about is a different kind of expression, similar to a ternary operator. It is not the same as if...else
- aib 8y agoThe reason it's not the same as if...else is that it's freaking backwards :D
- hellofunk 8y agoYou said: > Python uses `TRUE-CASE if COND else FALSE-CASE`. And this is wrong -- this is not how Python if statements work.
- aib 8y ago> > Python uses `TRUE-CASE if COND else FALSE-CASE`. > And this is wrong -- this is not how Python if statements work. Huh? Didn't you yourself say I was not talking about if statements: > What you are talking about is a different kind of expression, similar to a ternary operator. It is not the same as if...else In any case, I'm talking about the case that goes `TRUE-CASE if COND else FALSE-CASE`, as can be deduced from my typing `TRUE-CASE if COND else FALSE-CASE`.