En Thu, 07 Feb 2008 19:36:57 -0200, George Sakkis
<[EMAIL PROTECTED]> escribió:
> On Feb 7, 4:25 pm, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>> On Thu, 07 Feb 2008 15:59:13 +0100, Wildemar Wildenburger wrote:
>>
>> > val = foo rather than bar
>>
>> > If that is not clear and obvios, I don't know what is. ;)
>>
>> In English, the expression "foo rather than bar" means "bar is never
>> chosen, foo is always chosen".
>
> Ok, the fix is easy:
>
> val = BETTER foo THAN bar
Great! It could even be qualified:
val = BETTER foo THAN bar UNLESS not required(foo)
and nested:
val = BETTER foo THAN (
BETTER bar THAN baz
UNLESS lunar_phase=="Full Moon")
and used wherever any other expression is allowed:
val = BETTER foo THAN (
BETTER bar THAN baz
UNLESS insanity_level>threshold)
UNLESS self.parent is self \
if verbose else 42
Sane precedence rules would require using ( ) around the expression before
the if clause, I presume.
Eagerly awaiting the implementation,
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list