I realise I could roll my own here, but I wondered if there was an inbuilt version of this?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.
def default_if_none(*args):
for arg in args:
if arg:
return arg
return None
x = None
y = 5
z = 6
print default_if_none(x,y,z)
>> 5
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
--
http://mail.python.org/mailman/listinfo/python-list
