[Python-ideas] if we were to ever shorten `A if A else B` (was: PEP 505: None-aware operators)

Chris Barker - NOAA Federal chris.barker at noaa.gov
Sat Jul 21 13:38:07 EDT 2018


> my vote would go to `A otherwise B` since it's unambiguous, the case you care about the state  of comes first, and it doesn't trip your brain up looking for 'if'. :)

And I’d hope “otherwise” is a rare variable name :-)

- CHB

>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/


More information about the Python-ideas mailing list