The ternaery operator

Christian Gollwitzer auriocus at gmx.de
Thu Mar 16 04:12:18 EDT 2017


Am 16.03.17 um 04:12 schrieb Stefan Ram:
>   The syntax
>
> a if c else b
>
>   looks as if Guido made it intentionally ugly so that it will
>   not be used?
>  [...]

>   . But now Guido has invented something totally new. Why?

The rationale can be read in PEP 308:
https://www.python.org/dev/peps/pep-0308/

This should be the first place to go if you want to learn about Python 
language decisions. Asking here will just start the flame fire again.

	Christian



More information about the Python-list mailing list