On Thu, Jul 19, 2018 at 02:47:11PM -0400, Terry Reedy wrote: > I think most anyone should be able to get that 'A else B' is similar to > 'A or B' but must be different.
Knowing that `else` is different to `or` is not the problem. As you say, that's obvious. The problem is that `A else B` looks like it ought to be the same as "else B" in if...else statements and the ternary if operator. That is, "if the condition is false", and in this case there is nothing that even hints that the condition is "A is None" rather than just A. A else B if condition else C else D Oh my aching head. Things which are different ought to look different, not look like what they aren't. A ?? B if condition ?? C else D The precedence is still unclear and will probably benefit from some parentheses, but at least here the None-aware operator and the ternary if operator look different and can't be confused. -- Steve _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/