"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
"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
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
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