[Python-ideas] Statements vs Expressions... why?
piotrwysocki at gmail.com
Mon Sep 15 12:07:31 CEST 2008
On Sat, Sep 13, 2008 at 7:01 PM, Arnaud Delobelle
<arnodel at googlemail.com> wrote:
> So what does:
> a = (if False: 1)
> evaluate to?
Just a note how this problem was solved in Nemerle language:
you cannot use 'if' without 'else'. This way you always get a value.
If you want an 'if' without 'else', there is a new keyword 'when'
(well, there is also 'unless') for the imperative approach.
More information about the Python-ideas