What is the most idiomatic way to do the following?
def xstr(s): if s is None: return \'\' else: return s s = xstr(a) + xstr(b)
A neat one-liner to do this building on some of the other answers:
s = (lambda v: v or '')(a) + (lambda v: v or '')(b)
or even just:
s = (a or '') + (b or '')