4 ms·
> python3 -c 'print(None or "hello")' hello It evaluates to the left if that's truthy otherwise it evaluates to the right, similar to how `??` evaluates to
by ziml77 3y ago
> python3 -c 'print(None or "hello")'
hello
It evaluates to the left if that's truthy otherwise it evaluates to the right, similar to how `??` evaluates to the left if that's non-null otherwise the right.
In C# even if `||` automatically coerced the types, the output will always be a bool.