Why does list have no 'get' method?

pruebauno at latinmail.com pruebauno at latinmail.com
Fri Feb 8 09:14:55 EST 2008


On Feb 7, 4:36 pm, George Sakkis <george.sak... at gmail.com> wrote:
> On Feb 7, 4:25 pm, Steven D'Aprano <st... at REMOVE-THIS-
>
>
>
> cybersource.com.au> wrote:
> > On Thu, 07 Feb 2008 15:59:13 +0100, 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.  ;)
>
> > 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
>
> ;-)
>
> Cobol-strikes-back-ly yours,
>
> George

I use a ETL language/tool that actually has a function for this kind
of thing:

NulltoValue(value,defaultValue)

it returns defaultValue if value is null otherwise value.




More information about the Python-list mailing list