4 Jun
2019
4 Jun
'19
1:54 a.m.
On 6/3/2019 8:57 PM, James Lu wrote:
`if-unless` expressions in Python
if condition1 expr unless condition2
is an expression that roughly reduces to
expr if condition1 and not condition2 else EMPTY
An expression MUST evaluate to a value. EMPTY is spelled None in Python. No need for an alternate spelling. The only place that None is implicit rather than explicit is the implicit 'return None' *statement* at the end of functions. That is enough. -- Terry Jan Reedy