Add None coalescing operator in Python

That may be true. But then, many people coming to Python from other languages claim that our ternary if operator value if cond else altvalue is “unreadable”. So maybe readability depends on what you are used to.

With other languages using ?? I expect that people will soon consider x ?? y to be every bit as readable as x + y and f(*args, **kw).

In the 1990s, I was a heavy user of Apple’s Hypertalk language, which used syntax like

add 1 to x

put the value of background field "Address" into address

Do you think that’s worth the extra typing? That’s not a rhetorical question. The Hypertalk community loved Apple’s verbose syntax, but even they used abbreviated syntax sometimes.

Instead of comparing fake examples with variables x and y, we should look at examples from real code.

2 Likes