def search_for_attr_value(obj_list, attr, value):
    """
    Finds the first (not necesarilly the only) object in a list, where its
    attribute 'attr' is equal to 'value', returns None if none is found.
    """
    return next((obj for obj in obj_list if getattr(obj,attr, None) == value), None)