(resources)
yield host tuples of (name, attributes, groups)
yield host tuples of (name, attributes, groups)
yield host tuples of ( name attributes groups )
def iterhosts(resources):
    '''yield host tuples of (name, attributes, groups)'''
    for module_name, key, resource in resources:
        resource_type, name = key.split('.', 1)
        try:
            parser = PARSERS[resource_type]
        except KeyError:
            continue

        yield parser(resource, module_name)
def iterhosts ( resources ) : for module_name , key , resource in resources : resource_type , name = key . split ( '.' , 1 ) try : parser = PARSERS [ resource_type ] except KeyError : continue yield parser ( resource , module_name )