Dear Diez,

True, I was just mentioning a workaround for a typical case.

Kind regards,

Arjan

Diez B. Roggisch wrote:

>> Is it redundant according to your criteria, yes I would say:
>> 
>> a = {True: a, False: c}[condition]
>> 
>> or
>> 
>> a = [c, a][condition]
>> 
>> would yield exactly the same even in one sentence....
> 
> Obviously it is _not_ the exact same.
> 
> 
> def fac(n):
>   return n * fac(n-1) if n else 1
> 
> 
> Try that with your recipes above.
> 
> Diez

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to