[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: Why does list have no 'get' method?

Matthew_WARREN

2/8/2008 3:24:00 PM






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

even Ksh has one;

val=${foo:=$bar}


Matt.
(would it help if I put lots of blank lines after this, so the disclaimer
is out-of-sight/out-of-mind?)
--
ie, from here on?


This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.
Do not print this message unless it is necessary,
consider the environment.

---------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le
"message") sont etablis a l'intention exclusive de ses
destinataires et sont confidentiels. Si vous recevez ce
message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur. Toute utilisation de ce
message non conforme a sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf
autorisation expresse. L'internet ne permettant pas
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce
message, dans l'hypothese ou il aurait ete modifie.
N'imprimez ce message que si necessaire,
pensez a l'environnement.
2 Answers

Ben Finney

2/9/2008 12:58:00 AM

0

Matthew_WARREN@bnpparibas.com writes:

> (would it help if I put lots of blank lines after this, so the disclaimer
> is out-of-sight/out-of-mind?)

Not really.

It would help far more if you could stop having this disclaimer appear
at all on this list (or any other list, really, but that's a matter
for those lists to complain about).

This can be achieved either by preventing the disclaimer from being
attached, or by not posting from accounts that will cause the
disclaimer to appear.

--
\ "Writing a book is like washing an elephant: there no good |
`\ place to begin or end, and it's hard to keep track of what |
_o__) you've already covered." â??Anonymous |
Ben Finney

G F

2/11/2008 9:36:00 AM

0

On Feb 8, 4:24 pm, Matthew_WAR...@bnpparibas.com wrote:
> > > 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.
>
> even Ksh has one;
>
> val=${foo:=$bar}
>

An approximation in Python:

http://gflanagan.net/site/python/utils/RattlebagTempla...
http://gflanagan.net/site/python/utils/RattlebagT...