def get_by ( self , name ) : return next ( ( item for item in self if item . name == name ) , None )
python get item in list by name
get element by name
def get_by(self, name):
    """get element by name"""
    return next((item for item in self if item.name == name), None)