def if_none(obj, default):
    """
    Returns `obj`, unless it's `None`, in which case returns `default`.

      >>> if_none(42, "Hello!")
      42
      >>> if_none(None, "Hello!")
      'Hello!'

    """
    return default if obj is None else obj