def first_not_none(iterable):
    """Select the first item from an iterable that is not None.

    The idea is that you can use this to specify a list of fall-backs to use
    for configuration options.
    """
    for item in iterable:
        if item is not None:
            return item
    return None