> Bear in mind that these last ones are exactly equivalent to the "or"
> operator, as they'll use the default if you have any falsy value.
> variable = some_function(...) or []
Isn't that in itself a good argument in favor of (??) ? By missing to add 'is
None', I would have already added a subtle
Most of the discussion so far has been focused on (?.). Tbh though, I'm more
interested in (??) and (??=). Just reading through code, I constantly notice
boilerplate like this which could easily be substituted.
variable = some_function(...)
if variable is None:
variable = [] # some default