Conversation

Literally like when you have, with your normal syntax: if <b>: x else: y you should be able to just assign that to a variable: a = if <b>: x else: y This is how reasonable languages work. Better if it's not whitespace-sensitive so you can throw this on a line
5
16
this feels less like a complaint about Python and more like a complaint about statement-oriented languages, which I think includes nearly all imperative languages. but most C descendants do the b ? x : y syntax, which I think is *more* confusing than Python's solution.
2
8
(I do think that expression-oriented languages are better because of things like this, but they are definitely less popular in terms of total number of users and so are probably not what most people would consider "normal")
1
2
This whole thread is bonkers to me. It's like "why is this thing written like words and not written all sideways?" and I'm just over here like "wait, aren't words better?"
2
1
As you kind of hint at with your use of ‘otherwise’, ‘if/else’ is kind of a weird way to express a conditional in English anyway. Here's an interesting presentation that tries to track down where it came from: