Why does list have no 'get' method?

Wildemar Wildenburger lasses_weil at klapptsowieso.net
Thu Feb 7 09:59:13 EST 2008


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.  ;)

/W



More information about the Python-list mailing list