On 20/07/23 6:30 pm, James Addison via Python-ideas wrote:
    result = default if bar is None else bar
    or if you prefer
    result = bar if bar is not None else default

Would it shut anyone up if we had another logical operator:

    x otherwise y

equivalent to

    x if x is not None else y

?

--
Greg

_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/R55FL6U5RFMPLP6NWE4IMMLNR4OLVGTF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to