On Sat, 15 Jul 2023 at 21:09, Dom Grigonis <[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/3BKGZIIIP6HRMR52BXRYRMEPFYKBPRIW/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to