I am well aware of that. I just argue that it is not very pleasant to read.
Personally, I am not a big user of it. C’s although maybe doesn’t have words to read, but is much more pleasant in both conciseness and logical sequence. Maybe it is not a big issue for others, but if C’s style conditional expression existed, it would significantly change the way I write things. So just checking. :) > On 16 Jul 2023, at 00:06, Paul Moore <[email protected]> wrote: > > On Sat, 15 Jul 2023 at 21:09, Dom Grigonis <[email protected] > <mailto:[email protected]>> wrote: > So I would vote for something similar to: >> result = bar is None ? default : bar > > > result = default if bar is None else bar > > Python has a conditional expression already. > Paul
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/QARSVXWITOLFAXZZJLIEBSPFO35PRDDS/ Code of Conduct: http://python.org/psf/codeofconduct/
