substitute for c/java's ?:

piet at cs.uu.nl piet at cs.uu.nl
Fri Jun 22 13:10:21 CEST 2001


>>>>> Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl> (MK) writes:

MK> def aan(name):
MK>     """Utility which returns 'a' or 'an' for a given noun.
MK>     """
MK>     return if string.lower(name[0]) in 'aeiou' then 'an ' else 'a '

Which programming language is that? 
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum at hccnet.nl



More information about the Python-list mailing list