(test) ? a:b

Marko Rauhamaa marko at pacujo.net
Fri Oct 24 23:02:58 CEST 2014


alister <alister.nospam.ware at ntlworld.com>:

> a = <value> if <condition> else <another Value>
>
> is instantly obvious (at least to a native English speaker anyway)

And you can go further down that road. For example, you could say things
like:

    die unless everything is OK


Marko



More information about the Python-list mailing list