Why does list have no 'get' method?

Steve Holden steve at holdenweb.com
Thu Feb 7 10:12:02 EST 2008


Wildemar Wildenburger wrote:
> Arnaud Delobelle wrote:
>> Personally, between
>>
>> * foo if foo else bar
>> * foo or bar
>>
>> I prefer the second. Maybe it could be spelt
>>
>> * foo else bar ?
>>
> How about
> 
> val = foo rather than bar
> 
> If that is not clear and obvios, I don't know what is.  ;)
> 
Even clearer:

ASSIGN foo IF foo HAS A VALUE, OTHERWISE bar, TO val

Ahh, the joys of the COmmon Business Oriented Language.

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/




More information about the Python-list mailing list