#PEP824
PEP news 🗞️

"SC has decided to accept PEP 824 [None-coalescing operators] on the condition that the ??= operator is removed, leaving only the ?? operator in the proposal."

discuss.python.org/t/pep-824-no...
#Python #PEP #PEP824
PEP 824: None-coalescing operators
SC has decided to accept PEP 824 on the condition that the ??= operator is removed, leaving only the ?? operator in the proposal. We see value in ?? as an explicit way to express a fallback for None....
discuss.python.org
November 24, 2026 at 9:36 AM
?? is the none-coalescing operator.

What is ?? ?

From the PEP:

`a ?? b` is equivalent to `a if a is not None else b`, except that `a` is only evaluated once.

Similarly, `a or b` is equivalent to `a if a else b`, with `a` evaluated only once.

peps.python.org/pep-0824/#ho...
#Python #PEP #PEP824
PEP 824 – None-coalescing operators | peps.python.org
This PEP proposes adding two new operators.
peps.python.org
November 24, 2026 at 9:45 AM