3 ms·
I'm glad this was deferred because those replaced examples from the stdlib are difficult to read. I've used `or` coalescing plenty of times and definitely prefe
by kryptn 4y ago
I'm glad this was deferred because those replaced examples from the stdlib are difficult to read. I've used `or` coalescing plenty of times and definitely prefer it to a new operator.
That said, I really loved using null coalescing/propagation in C#, so I have to assume my bias is coming from wanting python to be more readable.
- dragonwriter 4y agoOr-coalescing can work fine for things that can either be None or truthy, but Python (unlike, say, Ruby) has fairly expansive falsey values, which create lots of places where None coalescing would work but or-coalescing doesn't.